Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature flags for targets #1354

Open
xermicus opened this issue Jun 4, 2023 · 3 comments
Open

Feature flags for targets #1354

xermicus opened this issue Jun 4, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@xermicus
Copy link
Contributor

xermicus commented Jun 4, 2023

Since the custom LLVM fork should only be necessary for the Solana backend, we should decouple the substrate backend. Otherwise anyone wanting to use solang as a library is forced to use the solana labs LLVM fork, even though they might not want to build SBF contracts at all.

Ideally the code base and build scripts can be controlled with a solana or SBF feature flag.

@LucasSte
Copy link
Contributor

LucasSte commented Jun 9, 2023

Solang is built on top of LLVM. Even if we decouple from Solana's LLVM fork, developers need LLVM installed locally. The LLVM libraries are only necessary for building Solang from source. The binaries we make available in our releases page are statically linked to LLVM, so no need to download anything.

@xermicus
Copy link
Contributor Author

xermicus commented Jun 9, 2023

(ACK, but what I meant is we should have a way to say "I want use Solang as a crate and I only care for the Substrate target" and it will work with vanilla LLVM. Otherwise, people will need the Solana labs LLVM fork as soon as they depend on Solang, even if they don't wanna build SBF contracts, which seems very odd)

@seanyoung
Copy link
Contributor

If you use upstream llvm, cargo test will on Substrate due to the linker not being re-entrant. Maybe that's been fixed in the latest llvm, I haven't looked at this for ages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants