[gn build] make libunwind build on macOS

This commit is contained in:
Nico Weber 2021-05-31 13:17:10 -04:00
parent bf92bdad77
commit 1279b79c9b
2 changed files with 5 additions and 3 deletions

View File

@ -18,12 +18,14 @@ group("default") {
deps += [ deps += [
"//libcxx", "//libcxx",
"//libcxxabi", "//libcxxabi",
"//libunwind",
] ]
} }
if (current_os == "linux" || current_os == "android") { if (current_os == "linux" || current_os == "android") {
deps += [ "//compiler-rt/test/hwasan" ] deps += [ "//compiler-rt/test/hwasan" ]
} }
if (current_os == "linux" || current_os == "mac") {
deps += [ "//libunwind" ]
}
testonly = true testonly = true
} }

View File

@ -84,8 +84,8 @@ if (libunwind_enable_shared) {
} }
if (current_os == "mac") { if (current_os == "mac") {
ldflags += [ ldflags += [
"-compatibility_version 1", "-Wl,-compatibility_version,1",
"-install_name /usr/lib/libunwind.1.dylib", "-Wl,-install_name,/usr/lib/libunwind.1.dylib",
] ]
} }
sources = unwind_sources sources = unwind_sources