From e75280da1dc7f24dbf703b6e89c00374cd56464f Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 18 Mar 2024 02:40:22 -0600 Subject: [PATCH] selfhost: Workaround Serenity's Clang toolchain triple parsing For some reason our patched clang can't find all the right libc++ files when the triple is x86_64-pc-serenity-unknown, but does without the unknown. --- selfhost/main.jakt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfhost/main.jakt b/selfhost/main.jakt index cf19bad07..850755b7f 100644 --- a/selfhost/main.jakt +++ b/selfhost/main.jakt @@ -995,7 +995,9 @@ fn compiler_main(anon args: [String]) throws -> c_int { if target_triple.has_value() { if compiler_is("clang++") and target_triple! != Target::active().name() { extra_compiler_flags.push("-target") - extra_compiler_flags.push(target_triple!) + // FIXME: The Serenity clang toolchain doesn't like getting -unknown appended to the target triple + // This is fine for now unless you're targeting musl libc, in which case, you're out of luck + extra_compiler_flags.push(Target::from_triple(target_triple!).name(abbreviate: true)) } }