From 53e9dd6aa933c1a5b43da83a88d5e07bf27285bf Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 28 Oct 2026 03:05:09 +0900 Subject: internal/rosa: do not hard code prefix This allows the prefix to be changed, at runtime if needed. Signed-off-by: Ophestra --- internal/rosa/llvm.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'internal/rosa/llvm.go') 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 -- cgit v1.3.1