diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn index 2c1839fffe8..c6f28d30db4 100644 --- a/build/toolchain/mac/BUILD.gn +++ b/build/toolchain/mac/BUILD.gn @@ -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" diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn index 609fa4210e4..fb682c0dd85 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn @@ -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" ] } }