Skip to content

Commit

Permalink
Set -arch flag for clang++ to properly cross-compile for macOS (#1004)
Browse files Browse the repository at this point in the history
  • Loading branch information
eymar authored Dec 12, 2024
1 parent 3bee764 commit 1654444
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ fun SkikoProjectContext.compileNativeBridgesTask(
OS.MacOS -> {
flags.set(listOf(
*buildType.clangFlags,
*skiaPreprocessorFlags(OS.MacOS, buildType)
*skiaPreprocessorFlags(OS.MacOS, buildType),
when(arch) {
Arch.Arm64 -> "-arch arm64"
Arch.X64 -> "-arch x86_64"
else -> error("Unexpected arch: $arch for $os")
}
))
}
OS.Linux -> {
Expand Down

0 comments on commit 1654444

Please sign in to comment.