| Index: tools/gn/secondary/build/config/mac/BUILD.gn
|
| diff --git a/tools/gn/secondary/build/config/mac/BUILD.gn b/tools/gn/secondary/build/config/mac/BUILD.gn
|
| index 7e13aed748182e598355ee792141719fad6753b1..a4026b6e36e8f68874cb1d33d50e7b8bda1c53ac 100644
|
| --- a/tools/gn/secondary/build/config/mac/BUILD.gn
|
| +++ b/tools/gn/secondary/build/config/mac/BUILD.gn
|
| @@ -2,8 +2,17 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +# On Mac, this is usefor everything except static libraries.
|
| +config("mac_dynamic_flags") {
|
| + ldflags = [
|
| + "-Wl,-search_paths_first",
|
| + ]
|
| +}
|
| +
|
| +
|
| cc = "../../third_party/llvm-build/Release+Asserts/bin/clang"
|
| cxx = "../../third_party/llvm-build/Release+Asserts/bin/clang++"
|
| +ld = cxx
|
|
|
| toolchain("clang") {
|
| tool("cc") {
|
| @@ -19,13 +28,13 @@ toolchain("clang") {
|
| deps = "gcc"
|
| }
|
| tool("objc") {
|
| - command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_objc \$cflags_pch_objc -c \$in -o \$out"
|
| + command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$cflags_objc \$cflags_pch_objc -c \$in -o \$out"
|
| description = "OBJC \$out"
|
| depfile = "\$out.d"
|
| deps = "gcc"
|
| }
|
| tool("objcxx") {
|
| - command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_objcc \$cflags_pch_objcc -c \$in -o \$out"
|
| + command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \$cflags_objcc \$cflags_pch_objcc -c \$in -o \$out"
|
| description = "OBJCXX \$out"
|
| depfile = "\$out.d"
|
| deps = "gcc"
|
| @@ -35,19 +44,19 @@ toolchain("clang") {
|
| description = "LIBTOOL-STATIC \$out, POSTBUILDS"
|
| }
|
| tool("solink") {
|
| - command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then \$ld -shared \$ldflags -o \$lib \$in \$solibs \$libs\$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else \$ld -shared \$ldflags -o \$lib \$in \$solibs \$libs\$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
|
| + command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs\$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs\$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
|
| description = "SOLINK \$lib, POSTBUILDS"
|
| #pool = "link_pool"
|
| restat = "1"
|
| }
|
| tool("solink_module") {
|
| - command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then \$ld -shared \$ldflags -o \$lib \$in \$solibs \$libs\$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else \$ld -shared \$ldflags -o \$lib \$in \$solibs \$libs\$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
|
| + command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs\$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs\$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
|
| description = "SOLINK(module) \$lib, POSTBUILDS"
|
| #pool = "link_pool"
|
| restat = "1"
|
| }
|
| tool("link") {
|
| - command = "\$ld \$ldflags -o \$out \$in \$solibs \$libs\$postbuilds"
|
| + command = "$ld \$ldflags -o \$out \$in \$solibs \$libs\$postbuilds"
|
| description = "LINK \$out, POSTBUILDS"
|
| #pool = "link_pool"
|
| }
|
|
|