mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[build] Use frameworks instead of libs
Newer GN doesn't allow `*.framework` elements in `libs`. It requires using `frameworks` instead. The toolchain definitions need to pass the new substituted variable to the link to make use of the new required way to express these dependencies. Bug: fxbug.dev/56683 Change-Id: I62e68a8e5bdfef095b72b38d9d41f757e510012b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155482 Auto-Submit: Roland McGrath <mcgrathr@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
3fef522496
commit
1b1a39708c
|
@ -130,7 +130,7 @@ template("mac_toolchain") {
|
|||
temporary_tocname = dylib + ".tmp"
|
||||
|
||||
does_reexport_command = "[ ! -e $dylib -o ! -e $tocname ] || otool -l $dylib | grep -q LC_REEXPORT_DYLIB"
|
||||
link_command = "$ld -shared $sysroot_flags $toolchain_flags {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}}"
|
||||
link_command = "$ld -shared $sysroot_flags $toolchain_flags {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}} {{frameworks}}"
|
||||
replace_command = "if ! cmp -s $temporary_tocname $tocname; then mv $temporary_tocname $tocname"
|
||||
extract_toc_command = "{ otool -l $dylib | grep LC_ID_DYLIB -A 5; nm -gP $dylib | cut -f1-2 -d' ' | grep -v U\$\$; true; }"
|
||||
|
||||
|
@ -171,7 +171,7 @@ template("mac_toolchain") {
|
|||
stripped_outfile = "{{root_out_dir}}/exe.stripped/$exename"
|
||||
}
|
||||
|
||||
command = "$ld $sysroot_flags $toolchain_flags {{ldflags}} -Xlinker -rpath -Xlinker @executable_path/Frameworks -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}}"
|
||||
command = "$ld $sysroot_flags $toolchain_flags {{ldflags}} -Xlinker -rpath -Xlinker @executable_path/Frameworks -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}} {{frameworks}}"
|
||||
if (defined(invoker.strip)) {
|
||||
strip = invoker.strip
|
||||
strip_command = "${strip} -x -o $stripped_outfile $outfile"
|
||||
|
|
|
@ -199,7 +199,7 @@ template("build_gen_snapshot") {
|
|||
}
|
||||
|
||||
if (is_mac) {
|
||||
libs = [
|
||||
frameworks = [
|
||||
"CoreFoundation.framework",
|
||||
"CoreServices.framework",
|
||||
]
|
||||
|
@ -445,13 +445,13 @@ template("dart_io") {
|
|||
defines = []
|
||||
deps = [ "//third_party/zlib" ] + extra_deps
|
||||
if (is_mac || is_ios) {
|
||||
libs = [
|
||||
frameworks = [
|
||||
"CoreFoundation.framework",
|
||||
"Security.framework",
|
||||
]
|
||||
|
||||
if (is_mac) {
|
||||
libs += [ "CoreServices.framework" ]
|
||||
frameworks += [ "CoreServices.framework" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue