Commit 81ced841 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

mac: Set better target flags when compiling on different hosts.

Bug: 1147069
Change-Id: If01314a9a6a7ba359f79cbd58ed9e732cf70928f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538720
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827718}
parent b0f7c47a
...@@ -15,22 +15,21 @@ config("compiler") { ...@@ -15,22 +15,21 @@ config("compiler") {
# CPU architecture. # CPU architecture.
if (current_cpu == "x64") { if (current_cpu == "x64") {
common_mac_flags += [ clang_arch = "x86_64"
"-arch",
"x86_64",
]
} else if (current_cpu == "x86") { } else if (current_cpu == "x86") {
common_mac_flags += [ clang_arch = "i386"
"-arch",
"i386",
]
} else if (current_cpu == "arm64") { } else if (current_cpu == "arm64") {
clang_arch = current_cpu
} else {
assert(false, "unknown current_cpu $current_cpu")
}
if (host_os == "mac") {
common_mac_flags += [ common_mac_flags += [
"-arch", "-arch",
current_cpu, clang_arch,
] ]
} else { } else {
assert(false, "unknown current_cpu $current_cpu") common_mac_flags += [ "--target=$clang_arch-apple-macos" ]
} }
# This is here so that all files get recompiled after an Xcode update. # This is here so that all files get recompiled after an Xcode update.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment