[llvm] gn build: Support llvm_enable_zstd. (PR #88457)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 17:02:18 PDT 2024
================
@@ -207,6 +207,9 @@ template("stage2_unix_toolchain") {
ar = "bin/llvm-ar"
deps += [ "//:llvm-ar($host_toolchain)" ]
}
+ if (toolchain_args.current_os != host_os) {
----------------
pcc wrote:
> should we just unconditionally set `llvm_enable_zstd = false` above in `toolchain_args`?
Yeah, let's just do that. (Maybe there should be a way to tell gn that an argument is per-toolchain, so setting it in `args.gn` would only affect the default toolchain. Then we could use that for these arguments that are really about what's available on the host.)
> and it'd be nice for `llvm_enable_zlib` to be consistent
Yeah, consistent in the sense that it should be a per-toolchain argument as well. In zlib/enable.gni we have
```
llvm_enable_zlib = host_os != "win" || zlib_path != ""
```
which is correct-ish for Android because zlib is part of the Android NDK. So we could copy that into `toolchain_args` here but with `s/host/toolchain_args.current/` (but in a separate change).
https://github.com/llvm/llvm-project/pull/88457
More information about the llvm-commits
mailing list