blob: cc391fbfe404f8438cfb50ed8da9410beb45b4a5 (
plain)
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
|
--- build/toolchain/gcc_toolchain.gni.orig 2024-06-17 12:56:06 UTC
+++ build/toolchain/gcc_toolchain.gni
@@ -57,6 +57,13 @@ if (enable_resource_allowlist_generation) {
"enable_resource_allowlist_generation=true does not work for target_os=$target_os")
}
+declare_args() {
+ extra_cflags = ""
+ extra_cppflags = ""
+ extra_cxxflags = ""
+ extra_ldflags = ""
+}
+
# This template defines a toolchain for something that works like gcc
# (including clang).
#
@@ -878,22 +885,12 @@ template("gcc_toolchain") {
# actually just be doing a native compile.
template("clang_toolchain") {
gcc_toolchain(target_name) {
- _path = "$clang_base_path/bin"
- _is_path_absolute = get_path_info(_path, "abspath") == _path
-
- # Preserve absolute paths for tools like distcc.
- if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) {
- prefix = _path
- } else {
- prefix = rebase_path(_path, root_build_dir)
- }
-
- cc = "${prefix}/clang"
- cxx = "${prefix}/clang++"
+ cc = "cc"
+ cxx = "c++"
ld = cxx
- readelf = "${prefix}/llvm-readelf"
- ar = "${prefix}/llvm-ar"
- nm = "${prefix}/llvm-nm"
+ readelf = "readelf"
+ ar = "ar"
+ nm = "nm"
forward_variables_from(invoker, "*", [ "toolchain_args" ])
|