[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 += [
"//libcxx",
"//libcxxabi",
"//libunwind",
]
}
if (current_os == "linux" || current_os == "android") {
deps += [ "//compiler-rt/test/hwasan" ]
}
if (current_os == "linux" || current_os == "mac") {
deps += [ "//libunwind" ]
}
testonly = true
}

View File

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