blob: 9c4b56c871396db54d15c795d7161057091fdb61 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
--- build/toolchain/gcc_toolchain.gni.orig 2017-04-19 19:06:28 UTC
+++ build/toolchain/gcc_toolchain.gni
@@ -12,6 +12,11 @@ import("//build/toolchain/clang_static_a
import("//build/toolchain/goma.gni")
import("//build/toolchain/toolchain.gni")
+declare_args() {
+ extra_cxxflags = ""
+ extra_ldflags = ""
+}
+
# This template defines a toolchain for something that works like gcc
# (including clang).
#
@@ -483,10 +488,22 @@ template("clang_toolchain") {
}
gcc_toolchain(target_name) {
- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
- cc = "$prefix/clang"
- cxx = "$prefix/clang++"
- ld = cxx
+ if (is_bsd) {
+ cc = "${toolprefix}clang39"
+ cxx = "${toolprefix}clang++39"
+ ld = cxx
+ readelf = "readelf"
+ ar = "${toolprefix}llvm-ar39"
+ nm = "${toolprefix}llvm-nm39"
+ } else {
+ prefix = rebase_path("$clang_base_path/bin", root_build_dir)
+ cc = "$prefix/clang"
+ cxx = "$prefix/clang++"
+ ld = cxx
+ readelf = "${toolprefix}readelf"
+ ar = "${toolprefix}ar"
+ nm = "${toolprefix}nm"
+ }
if (use_clang_static_analyzer) {
# Static analysis isn't supported under GOMA. See crbug.com/687245
@@ -507,10 +524,6 @@ template("clang_toolchain") {
root_build_dir)
}
- readelf = "${toolprefix}readelf"
- ar = "${toolprefix}ar"
- nm = "${toolprefix}nm"
-
forward_variables_from(invoker, [ "strip" ])
toolchain_args = {
|