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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # On Mac, this is usefor everything except static libraries.
6 config("mac_dynamic_flags") {
7 ldflags = [
8 "-Wl,-search_paths_first",
9 ]
10 }
11
12
5 cc = "../../third_party/llvm-build/Release+Asserts/bin/clang" 13 cc = "../../third_party/llvm-build/Release+Asserts/bin/clang"
6 cxx = "../../third_party/llvm-build/Release+Asserts/bin/clang++" 14 cxx = "../../third_party/llvm-build/Release+Asserts/bin/clang++"
15 ld = cxx
7 16
8 toolchain("clang") { 17 toolchain("clang") {
9 tool("cc") { 18 tool("cc") {
10 command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$c flags_pch_c -c \$in -o \$out" 19 command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$c flags_pch_c -c \$in -o \$out"
11 description = "CC \$out" 20 description = "CC \$out"
12 depfile = "\$out.d" 21 depfile = "\$out.d"
13 deps = "gcc" 22 deps = "gcc"
14 } 23 }
15 tool("cxx") { 24 tool("cxx") {
16 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \ $cflags_pch_cc -c \$in -o \$out" 25 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \ $cflags_pch_cc -c \$in -o \$out"
17 description = "CXX \$out" 26 description = "CXX \$out"
18 depfile = "\$out.d" 27 depfile = "\$out.d"
19 deps = "gcc" 28 deps = "gcc"
20 } 29 }
21 tool("objc") { 30 tool("objc") {
22 command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_objc \$cflags_pch_objc -c \$in -o \$out" 31 command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$c flags_objc \$cflags_pch_objc -c \$in -o \$out"
23 description = "OBJC \$out" 32 description = "OBJC \$out"
24 depfile = "\$out.d" 33 depfile = "\$out.d"
25 deps = "gcc" 34 deps = "gcc"
26 } 35 }
27 tool("objcxx") { 36 tool("objcxx") {
28 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_objc c \$cflags_pch_objcc -c \$in -o \$out" 37 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \ $cflags_objcc \$cflags_pch_objcc -c \$in -o \$out"
29 description = "OBJCXX \$out" 38 description = "OBJCXX \$out"
30 depfile = "\$out.d" 39 depfile = "\$out.d"
31 deps = "gcc" 40 deps = "gcc"
32 } 41 }
33 tool("alink") { 42 tool("alink") {
34 command = "rm -f \$out && ./gyp-mac-tool filter-libtool libtool \$libtool_fl ags -static -o \$out \$in\$postbuilds" 43 command = "rm -f \$out && ./gyp-mac-tool filter-libtool libtool \$libtool_fl ags -static -o \$out \$in\$postbuilds"
35 description = "LIBTOOL-STATIC \$out, POSTBUILDS" 44 description = "LIBTOOL-STATIC \$out, POSTBUILDS"
36 } 45 }
37 tool("solink") { 46 tool("solink") {
38 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" 47 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\$p ostbuilds && { 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 \$li b \$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 ! cm p -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
39 description = "SOLINK \$lib, POSTBUILDS" 48 description = "SOLINK \$lib, POSTBUILDS"
40 #pool = "link_pool" 49 #pool = "link_pool"
41 restat = "1" 50 restat = "1"
42 } 51 }
43 tool("solink_module") { 52 tool("solink_module") {
44 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" 53 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\$p ostbuilds && { 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 \$li b \$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 ! cm p -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
45 description = "SOLINK(module) \$lib, POSTBUILDS" 54 description = "SOLINK(module) \$lib, POSTBUILDS"
46 #pool = "link_pool" 55 #pool = "link_pool"
47 restat = "1" 56 restat = "1"
48 } 57 }
49 tool("link") { 58 tool("link") {
50 command = "\$ld \$ldflags -o \$out \$in \$solibs \$libs\$postbuilds" 59 command = "$ld \$ldflags -o \$out \$in \$solibs \$libs\$postbuilds"
51 description = "LINK \$out, POSTBUILDS" 60 description = "LINK \$out, POSTBUILDS"
52 #pool = "link_pool" 61 #pool = "link_pool"
53 } 62 }
54 #tool("infoplist") { 63 #tool("infoplist") {
55 # command = "$cc -E -P -Wno-trigraphs -x c \$defines \$in -o \$out && plutil -convert xml1 \$out \$out" 64 # command = "$cc -E -P -Wno-trigraphs -x c \$defines \$in -o \$out && plutil -convert xml1 \$out \$out"
56 # description = "INFOPLIST \$out" 65 # description = "INFOPLIST \$out"
57 #} 66 #}
58 #tool("mac_tool") { 67 #tool("mac_tool") {
59 # command = "\$env ./gyp-mac-tool \$mactool_cmd \$in \$out" 68 # command = "\$env ./gyp-mac-tool \$mactool_cmd \$in \$out"
60 # description = "MACTOOL \$mactool_cmd \$in" 69 # description = "MACTOOL \$mactool_cmd \$in"
61 #} 70 #}
62 #tool("package_framework") { 71 #tool("package_framework") {
63 # command = "./gyp-mac-tool package-framework \$out \$version\$postbuilds && touch \$out" 72 # command = "./gyp-mac-tool package-framework \$out \$version\$postbuilds && touch \$out"
64 # description = "PACKAGE FRAMEWORK \$out, POSTBUILDS" 73 # description = "PACKAGE FRAMEWORK \$out, POSTBUILDS"
65 #} 74 #}
66 tool("stamp") { 75 tool("stamp") {
67 command = "\${postbuilds}touch \$out" 76 command = "\${postbuilds}touch \$out"
68 description = "STAMP \$out" 77 description = "STAMP \$out"
69 } 78 }
70 tool("copy") { 79 tool("copy") {
71 command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$ou t)" 80 command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$ou t)"
72 description = "COPY \$in \$out" 81 description = "COPY \$in \$out"
73 } 82 }
74 } 83 }
OLDNEW
« 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