Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: tools/gn/secondary/build/config/mac/BUILD.gn

Issue 21983003: Make the Mac build work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dunnow Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/secondary/build/config/compiler/BUILD.gn ('k') | tools/gn/secondary/third_party/libevent/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
}
« no previous file with comments | « tools/gn/secondary/build/config/compiler/BUILD.gn ('k') | tools/gn/secondary/third_party/libevent/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698