Skip to content

Commit

Permalink
selfhost: Workaround Serenity's Clang toolchain triple parsing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ADKaster committed Mar 18, 2024
1 parent def4bf4 commit e75280d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion selfhost/main.jakt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down

0 comments on commit e75280d

Please sign in to comment.