Skip to content

Commit

Permalink
[wimal] Fix the linker version for darwin targets
Browse files Browse the repository at this point in the history
  • Loading branch information
disigma committed Nov 29, 2024
1 parent b51c603 commit 4f4eca6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions wimal/cc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,20 @@ void Cc::Run(const Context *context, std::vector<std::string> extraArgs) {
break;
}
}
// Fix the linker version for darwin targets.
switch (context->machine) {
case Context::MACHINE_X64_MACOS:
case Context::MACHINE_A64_MACOS:
case Context::MACHINE_ARM_IOS:
case Context::MACHINE_A64_IOS:
case Context::MACHINE_X86_IOS:
case Context::MACHINE_X64_IOS:
args.emplace_back("-mlinker-version=305");
break;
default: {
break;
}
}
// Fix the compilation error: "_Float16 is not supported on this target".
// See: https://clang.llvm.org/docs/LanguageExtensions.html#half-precision-floating-point
switch (context->machine) {
Expand Down

0 comments on commit 4f4eca6

Please sign in to comment.