diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-10 00:59:14 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-10 00:59:14 +0900 |
| commit | e9c890cbb2c8c15d5db41d56b99878e500edeed0 (patch) | |
| tree | 1ea2e03e32f04d28cc053ac1e473b3c0ac51a854 /internal/rosa | |
| parent | 6f924336fc280966249e05785fa9aac106ff562e (diff) | |
internal/rosa/llvm: enable cross compilation
This now passes the test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa')
| -rw-r--r-- | internal/rosa/llvm.go | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go index e68ab6aa..7424a2fd 100644 --- a/internal/rosa/llvm.go +++ b/internal/rosa/llvm.go @@ -216,17 +216,19 @@ index 9da357a7ebb9..b2931510c1ae 100644 // newLLVM returns LLVM toolchain across multiple [pkg.Artifact]. func (t Toolchain) newLLVM() (musl, compilerRT, runtimes, clang pkg.Artifact) { - var target string - switch runtime.GOARCH { - case "386", "amd64": - target = "X86" - case "arm64": - target = "AArch64" - case "riscv64": - target = "RISCV" + target := "'AArch64;RISCV;X86'" + if t.isStage0() { + switch runtime.GOARCH { + case "386", "amd64": + target = "X86" + case "arm64": + target = "AArch64" + case "riscv64": + target = "RISCV" - default: - panic("unsupported target " + runtime.GOARCH) + default: + panic("unsupported target " + runtime.GOARCH) + } } minimalDeps := []KV{ @@ -248,7 +250,7 @@ func (t Toolchain) newLLVM() (musl, compilerRT, runtimes, clang pkg.Artifact) { {"CMAKE_CXX_COMPILER_TARGET", ""}, {"COMPILER_RT_BUILD_BUILTINS", "ON"}, - {"COMPILER_RT_DEFAULT_TARGET_ONLY", "ON"}, + {"COMPILER_RT_DEFAULT_TARGET_ONLY", "OFF"}, {"COMPILER_RT_SANITIZERS_TO_BUILD", "asan"}, {"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR", "ON"}, |
