diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn index 9c52e89f223..10a77844b67 100644 --- a/build/toolchain/mac/BUILD.gn +++ b/build/toolchain/mac/BUILD.gn @@ -183,7 +183,7 @@ template("mac_toolchain") { tool("link") { outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" rspfile = "$outfile.rsp" - command = "$ld $sysroot_flags $toolchain_flags {{ldflags}} -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}}" description = "LINK $outfile" rspfile_content = "{{inputs_newline}}" outputs = [