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

Side by Side Diff: build/toolchain/gcc_toolchain.gni

Issue 1610093003: Add option make_clang_dir to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change name to make_clang_dir Created 4 years, 11 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 import("//build/config/nacl/config.gni") 5 import("//build/config/nacl/config.gni")
6 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
7 import("//build/toolchain/ccache.gni") 7 import("//build/toolchain/ccache.gni")
8 import("//build/toolchain/goma.gni") 8 import("//build/toolchain/goma.gni")
9 import("//build/toolchain/toolchain.gni") 9 import("//build/toolchain/toolchain.gni")
10 10
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 is_tsan = false 418 is_tsan = false
419 is_ubsan = false 419 is_ubsan = false
420 is_ubsan_vptr = false 420 is_ubsan_vptr = false
421 } 421 }
422 } 422 }
423 423
424 forward_variables_from(invoker, [ "deps" ]) 424 forward_variables_from(invoker, [ "deps" ])
425 } 425 }
426 } 426 }
427 427
428 declare_args() {
429 # changes the path to the clang executable
430 make_clang_dir = "default"
Dirk Pranke 2016/01/25 20:47:46 this seems kinda crufty. Can you just do: decl
Nico 2016/01/25 21:07:19 I agree that the current name isn't great. It's hi
mkollaro 2016/01/26 09:03:37 I'm not sure how to do that in a reasonable manner
mkollaro 2016/01/26 09:03:37 Done.
431 }
432
428 # This is a shorthand for gcc_toolchain instances based on the 433 # This is a shorthand for gcc_toolchain instances based on the
429 # Chromium-built version of Clang. Only the toolchain_cpu and 434 # Chromium-built version of Clang. Only the toolchain_cpu and
430 # toolchain_os variables need to be specified by the invoker, and 435 # toolchain_os variables need to be specified by the invoker, and
431 # optionally toolprefix if it's a cross-compile case. Note that for 436 # optionally toolprefix if it's a cross-compile case. Note that for
432 # a cross-compile case this toolchain requires a config to pass the 437 # a cross-compile case this toolchain requires a config to pass the
433 # appropriate -target option, or else it will actually just be doing 438 # appropriate -target option, or else it will actually just be doing
434 # a native compile. The invoker can optionally override use_gold too. 439 # a native compile. The invoker can optionally override use_gold too.
435 template("clang_toolchain") { 440 template("clang_toolchain") {
436 assert(defined(invoker.toolchain_cpu), 441 assert(defined(invoker.toolchain_cpu),
437 "clang_toolchain() must specify a \"toolchain_cpu\"") 442 "clang_toolchain() must specify a \"toolchain_cpu\"")
438 assert(defined(invoker.toolchain_os), 443 assert(defined(invoker.toolchain_os),
439 "clang_toolchain() must specify a \"toolchain_os\"") 444 "clang_toolchain() must specify a \"toolchain_os\"")
440 if (defined(invoker.toolprefix)) { 445 if (defined(invoker.toolprefix)) {
441 toolprefix = invoker.toolprefix 446 toolprefix = invoker.toolprefix
442 } else { 447 } else {
443 toolprefix = "" 448 toolprefix = ""
444 } 449 }
445 450
446 gcc_toolchain(target_name) { 451 gcc_toolchain(target_name) {
447 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 452 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
448 root_build_dir) 453 root_build_dir)
454 if (make_clang_dir != "default") {
455 prefix = make_clang_dir
456 }
449 cc = "$prefix/clang" 457 cc = "$prefix/clang"
450 cxx = "$prefix/clang++" 458 cxx = "$prefix/clang++"
451 ld = cxx 459 ld = cxx
452 is_clang = true 460 is_clang = true
453 461
454 readelf = "${toolprefix}readelf" 462 readelf = "${toolprefix}readelf"
455 ar = "${toolprefix}ar" 463 ar = "${toolprefix}ar"
456 nm = "${toolprefix}nm" 464 nm = "${toolprefix}nm"
457 465
458 forward_variables_from(invoker, 466 forward_variables_from(invoker,
459 [ 467 [
460 "toolchain_cpu", 468 "toolchain_cpu",
461 "toolchain_os", 469 "toolchain_os",
462 "use_gold", 470 "use_gold",
463 ]) 471 ])
464 } 472 }
465 } 473 }
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