OLD | NEW |
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 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires |
| 6 # some enhancements since the commands on Mac are slightly different than on |
| 7 # Linux. |
| 8 |
5 # Should only be running on Mac. | 9 # Should only be running on Mac. |
6 assert(is_mac || is_ios) | 10 assert(is_mac || is_ios) |
7 | 11 |
8 cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", ".", root
_build_dir) | 12 # Clang variables. |
9 cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".", r
oot_build_dir) | 13 import("../clang.gni") |
| 14 |
| 15 if (is_clang) { |
| 16 cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", ".", ro
ot_build_dir) |
| 17 cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".",
root_build_dir) |
| 18 |
| 19 # Set the GYP header for all toolchains when running under Clang. |
| 20 if (is_gyp) { |
| 21 gyp_header = make_clang_global_settings |
| 22 } |
| 23 } else { |
| 24 cc = "gcc" |
| 25 cxx = "g++" |
| 26 } |
10 ld = cxx | 27 ld = cxx |
11 | 28 |
12 # This will copy the gyp-mac-tool to the build directory. We pass in the source | 29 # This will copy the gyp-mac-tool to the build directory. We pass in the source |
13 # file of the win tool. | 30 # file of the win tool. |
14 gyp_mac_tool_source = | 31 gyp_mac_tool_source = |
15 rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", ".", root_build_dir) | 32 rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", ".", root_build_dir) |
16 exec_script("setup_toolchain.py", [ gyp_mac_tool_source ], "value") | 33 exec_script("setup_toolchain.py", [ gyp_mac_tool_source ], "value") |
17 | 34 |
18 toolchain("clang") { | 35 toolchain("clang") { |
19 # Make these apply to all tools below. | 36 # Make these apply to all tools below. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #} | 90 #} |
74 tool("stamp") { | 91 tool("stamp") { |
75 command = "\${postbuilds}touch \$out" | 92 command = "\${postbuilds}touch \$out" |
76 description = "STAMP \$out" | 93 description = "STAMP \$out" |
77 } | 94 } |
78 tool("copy") { | 95 tool("copy") { |
79 command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$ou
t)" | 96 command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$ou
t)" |
80 description = "COPY \$in \$out" | 97 description = "COPY \$in \$out" |
81 } | 98 } |
82 } | 99 } |
OLD | NEW |