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

Side by Side Diff: build/toolchain/mac/BUILD.gn

Issue 2088823002: Remove toolchain definition to build with gcc on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-uses-xcode-clang
Patch Set: Rebase Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires 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 6 # some enhancements since the commands on Mac are slightly different than on
7 # Linux. 7 # Linux.
8 8
9 import("../goma.gni") 9 import("../goma.gni")
10 import("//build/config/ios/ios_sdk.gni") 10 import("//build/config/ios/ios_sdk.gni")
11 import("//build/config/mac/mac_sdk.gni") 11 import("//build/config/mac/mac_sdk.gni")
12 import("//build/config/mac/symbols.gni") 12 import("//build/config/mac/symbols.gni")
13 13
14 assert(host_os == "mac") 14 assert(host_os == "mac")
15 15
16 import("//build/toolchain/cc_wrapper.gni") 16 import("//build/toolchain/cc_wrapper.gni")
17 import("//build/toolchain/goma.gni") 17 import("//build/toolchain/goma.gni")
18 import("//build/toolchain/toolchain.gni") 18 import("//build/toolchain/toolchain.gni")
19 import("//build/toolchain/concurrent_links.gni") 19 import("//build/toolchain/concurrent_links.gni")
20 20
21 if (use_goma) { 21 if (use_goma) {
22 assert(cc_wrapper == "", "Goma and cc_wrapper can't be used together.") 22 assert(cc_wrapper == "", "Goma and cc_wrapper can't be used together.")
23 compiler_prefix = "$goma_dir/gomacc " 23 compiler_prefix = "$goma_dir/gomacc "
24 } else if (cc_wrapper != "") { 24 } else if (cc_wrapper != "") {
25 compiler_prefix = cc_wrapper + " " 25 compiler_prefix = cc_wrapper + " "
26 } else { 26 } else {
27 compiler_prefix = "" 27 compiler_prefix = ""
28 } 28 }
29 29
30 if (use_xcode_clang) { 30 if (!use_xcode_clang) {
31 _clang_prefix = "" 31 compiler_prefix = compiler_prefix +
32 } else { 32 rebase_path("//third_party/llvm-build/Release+Asserts/bin/",
33 _clang_prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin/", 33 root_build_dir)
34 root_build_dir)
35 } 34 }
36 35
37 if (current_toolchain == default_toolchain) { 36 if (current_toolchain == default_toolchain) {
38 # Reduce the number of tasks using the copy_bundle_data and compile_xcassets 37 # Reduce the number of tasks using the copy_bundle_data and compile_xcassets
39 # tools as they can cause lots of I/O contention when invoking ninja with a 38 # tools as they can cause lots of I/O contention when invoking ninja with a
40 # large number of parallel jobs (e.g. when using distributed build like goma). 39 # large number of parallel jobs (e.g. when using distributed build like goma).
41 pool("bundle_pool") { 40 pool("bundle_pool") {
42 depth = concurrent_links 41 depth = concurrent_links
43 } 42 }
44 } 43 }
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 if (defined(invoker.is_clang)) { 353 if (defined(invoker.is_clang)) {
355 is_clang = invoker.is_clang 354 is_clang = invoker.is_clang
356 } 355 }
357 } 356 }
358 } 357 }
359 } 358 }
360 359
361 mac_toolchain("clang_arm") { 360 mac_toolchain("clang_arm") {
362 toolchain_cpu = "arm" 361 toolchain_cpu = "arm"
363 toolchain_os = "mac" 362 toolchain_os = "mac"
364 cc = "${compiler_prefix}${_clang_prefix}clang" 363 cc = "${compiler_prefix}clang"
sdefresne 2016/06/21 20:33:18 I noticed that cc/cxx/ld/is_clang are always the s
Dirk Pranke 2016/06/21 21:24:50 It probably would be a good idea to inline them in
365 cxx = "${compiler_prefix}${_clang_prefix}clang++" 364 cxx = "${compiler_prefix}clang++"
366 ld = cxx 365 ld = cxx
367 is_clang = true 366 is_clang = true
368 } 367 }
369 368
370 mac_toolchain("arm") {
371 toolchain_cpu = "arm"
372 toolchain_os = "mac"
373 cc = "${compiler_prefix}gcc"
374 cxx = "${compiler_prefix}g++"
375 ld = cxx
376 is_clang = false
377 }
378
379 mac_toolchain("clang_x64") { 369 mac_toolchain("clang_x64") {
380 toolchain_cpu = "x64" 370 toolchain_cpu = "x64"
381 toolchain_os = "mac" 371 toolchain_os = "mac"
382 cc = "${compiler_prefix}${_clang_prefix}clang" 372 cc = "${compiler_prefix}clang"
383 cxx = "${compiler_prefix}${_clang_prefix}clang++" 373 cxx = "${compiler_prefix}clang++"
384 ld = cxx 374 ld = cxx
385 is_clang = true 375 is_clang = true
386 } 376 }
387 377
388 mac_toolchain("x64") {
389 toolchain_cpu = "x64"
390 toolchain_os = "mac"
391 cc = "${compiler_prefix}gcc"
392 cxx = "${compiler_prefix}g++"
393 ld = cxx
394 is_clang = false
395 }
396
397 mac_toolchain("ios_clang_arm") { 378 mac_toolchain("ios_clang_arm") {
398 toolchain_cpu = "arm" 379 toolchain_cpu = "arm"
399 toolchain_os = "mac" 380 toolchain_os = "mac"
400 cc = "${compiler_prefix}${_clang_prefix}clang" 381 cc = "${compiler_prefix}clang"
401 cxx = "${compiler_prefix}${_clang_prefix}clang++" 382 cxx = "${compiler_prefix}clang++"
402 ld = cxx 383 ld = cxx
403 is_clang = true 384 is_clang = true
404 } 385 }
405 386
406 mac_toolchain("ios_clang_arm64") { 387 mac_toolchain("ios_clang_arm64") {
407 toolchain_cpu = "arm64" 388 toolchain_cpu = "arm64"
408 toolchain_os = "mac" 389 toolchain_os = "mac"
409 cc = "${compiler_prefix}${_clang_prefix}clang" 390 cc = "${compiler_prefix}clang"
410 cxx = "${compiler_prefix}${_clang_prefix}clang++" 391 cxx = "${compiler_prefix}clang++"
411 ld = cxx 392 ld = cxx
412 is_clang = true 393 is_clang = true
413 } 394 }
414 395
415 mac_toolchain("ios_clang_x86") { 396 mac_toolchain("ios_clang_x86") {
416 toolchain_cpu = "x86" 397 toolchain_cpu = "x86"
417 toolchain_os = "mac" 398 toolchain_os = "mac"
418 cc = "${compiler_prefix}${_clang_prefix}clang" 399 cc = "${compiler_prefix}clang"
419 cxx = "${compiler_prefix}${_clang_prefix}clang++" 400 cxx = "${compiler_prefix}clang++"
420 ld = cxx 401 ld = cxx
421 is_clang = true 402 is_clang = true
422 } 403 }
423 404
424 mac_toolchain("ios_clang_x64") { 405 mac_toolchain("ios_clang_x64") {
425 toolchain_cpu = "x64" 406 toolchain_cpu = "x64"
426 toolchain_os = "mac" 407 toolchain_os = "mac"
427 cc = "${compiler_prefix}${_clang_prefix}clang" 408 cc = "${compiler_prefix}clang"
428 cxx = "${compiler_prefix}${_clang_prefix}clang++" 409 cxx = "${compiler_prefix}clang++"
429 ld = cxx 410 ld = cxx
430 is_clang = true 411 is_clang = true
431 } 412 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698