diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-28 03:05:09 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-28 04:12:42 +0900 |
| commit | 53e9dd6aa933c1a5b43da83a88d5e07bf27285bf (patch) | |
| tree | 75d23f52901368c2e9764df631d37b8eb7484723 /internal/rosa/llvm.go | |
| parent | 7e3ba55cdc4d4a7c19deb65879e8abbb12a8e458 (diff) | |
internal/rosa: do not hard code prefix
This allows the prefix to be changed, at runtime if needed.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/llvm.go')
| -rw-r--r-- | internal/rosa/llvm.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go index 019d2cf6..dacb9098 100644 --- a/internal/rosa/llvm.go +++ b/internal/rosa/llvm.go @@ -94,7 +94,7 @@ func init() { {"CLANG_DEFAULT_RTLIB", "compiler-rt"}, {"CLANG_DEFAULT_UNWINDLIB", "libunwind"}, {"CLANG_DEFAULT_CXX_STDLIB", "libc++"}, - {"CLANG_CONFIG_FILE_SYSTEM_DIR", "/system/etc/clang"}, + {"CLANG_CONFIG_FILE_SYSTEM_DIR", Prefix + "/etc/clang"}, } common := []KV{ @@ -266,7 +266,7 @@ func init() { Paths: paths, ScriptEarly: ` -rm -f /system/bin/clang++.cfg +rm -f ` + Prefix + `/bin/clang++.cfg `, Tools: P{ @@ -283,11 +283,11 @@ rm -f /system/bin/clang++.cfg Cache: cache, Script: ` -ln -s ld.lld /work/system/bin/ld -ln -s clang /work/system/bin/cc -ln -s clang /work/system/bin/cpp -ln -s clang++ /work/system/bin/c++ -cat << EOF > /work/system/bin/clang++.cfg +ln -s ld.lld /work` + Prefix + `/bin/ld +ln -s clang /work` + Prefix + `/bin/cc +ln -s clang /work` + Prefix + `/bin/cpp +ln -s clang++ /work` + Prefix + `/bin/c++ +cat << EOF > /work` + Prefix + `/bin/clang++.cfg -static-libstdc++ -Wl,--exclude-libs,libunwind.a:libc++.a:libc++experimental.a:libc++abi.a EOF |
