diff --git a/llvm/utils/gn/build/toolchain/BUILD.gn b/llvm/utils/gn/build/toolchain/BUILD.gn --- a/llvm/utils/gn/build/toolchain/BUILD.gn +++ b/llvm/utils/gn/build/toolchain/BUILD.gn @@ -73,7 +73,7 @@ tool("solink") { outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}" if (current_os == "mac") { - command = "$ld -shared {{ldflags}} -o $outfile {{inputs}} {{libs}}" + command = "$ld -shared {{ldflags}} -o $outfile {{inputs}} {{libs}} {{frameworks}}" default_output_extension = ".dylib" } else { command = "$ld -shared {{ldflags}} -Wl,-z,defs -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{inputs}} {{libs}}" @@ -89,7 +89,7 @@ tool("solink_module") { outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}" if (current_os == "mac") { - command = "$ld -shared {{ldflags}} -Wl,-flat_namespace -Wl,-undefined,suppress -o $outfile {{inputs}} {{libs}}" + command = "$ld -shared {{ldflags}} -Wl,-flat_namespace -Wl,-undefined,suppress -o $outfile {{inputs}} {{libs}} {{frameworks}}" default_output_extension = ".dylib" } else { command = "$ld -shared {{ldflags}} -Wl,-soname,{{target_output_name}}{{output_extension}} -o $outfile {{inputs}} {{libs}}" @@ -104,7 +104,8 @@ tool("link") { outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}" if (current_os == "mac") { - command = "$ld {{ldflags}} -o $outfile {{inputs}} {{libs}}" + command = + "$ld {{ldflags}} -o $outfile {{inputs}} {{libs}} {{frameworks}}" } else { command = "$ld {{ldflags}} -o $outfile -Wl,--start-group {{inputs}} -Wl,--end-group {{libs}}" } diff --git a/llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn --- a/llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn @@ -30,6 +30,6 @@ "dsymutil.cpp", ] if (host_os == "mac") { - libs = [ "CoreFoundation.framework" ] + frameworks = [ "CoreFoundation.framework" ] } }