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

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

Issue 1307653008: Fix more aspects of the NaCl build configs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add more clarifying comments about NaCl and the -std flag Created 5 years, 3 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
OLDNEW
1 # Copyright (c) 2014 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2014 The Native Client 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/sysroot.gni") 5 import("//build/config/sysroot.gni")
6 import("//build/toolchain/nacl_toolchain.gni") 6 import("//build/toolchain/nacl_toolchain.gni")
7 7
8 nacl_toolchain_dir = rebase_path("//native_client/toolchain", root_build_dir) 8 nacl_toolchain_dir = rebase_path("//native_client/toolchain", root_build_dir)
9 os_toolchain_dir = "${nacl_toolchain_dir}/${current_os}_x86" 9 os_toolchain_dir = "${nacl_toolchain_dir}/${current_os}_x86"
10 10
(...skipping 15 matching lines...) Expand all
26 nacl_arm_newlib_rev = revisions[0] 26 nacl_arm_newlib_rev = revisions[0]
27 nacl_x86_newlib_rev = revisions[1] 27 nacl_x86_newlib_rev = revisions[1]
28 nacl_x86_glibc_rev = revisions[2] 28 nacl_x86_glibc_rev = revisions[2]
29 pnacl_newlib_rev = revisions[3] 29 pnacl_newlib_rev = revisions[3]
30 30
31 nacl_toolchain("newlib_arm") { 31 nacl_toolchain("newlib_arm") {
32 toolchain_package = "nacl_arm_newlib" 32 toolchain_package = "nacl_arm_newlib"
33 toolchain_revision = nacl_arm_newlib_rev 33 toolchain_revision = nacl_arm_newlib_rev
34 toolchain_cpu = "arm" 34 toolchain_cpu = "arm"
35 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/arm-nacl-" 35 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/arm-nacl-"
36 is_clang = false
36 37
37 cc = toolprefix + "gcc" 38 cc = toolprefix + "gcc"
38 cxx = toolprefix + "g++" 39 cxx = toolprefix + "g++"
39 ar = toolprefix + "ar" 40 ar = toolprefix + "ar"
40 ld = cxx 41 ld = cxx
41 } 42 }
42 43
43 nacl_toolchain("newlib_x86") { 44 nacl_toolchain("newlib_x86") {
44 toolchain_package = "nacl_x86_newlib" 45 toolchain_package = "nacl_x86_newlib"
45 toolchain_revision = nacl_x86_newlib_rev 46 toolchain_revision = nacl_x86_newlib_rev
46 toolchain_cpu = "x86" 47 toolchain_cpu = "x86"
47 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-" 48 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-"
49 is_clang = false
48 50
49 cc = toolprefix + "gcc" 51 cc = toolprefix + "gcc"
50 cxx = toolprefix + "g++" 52 cxx = toolprefix + "g++"
51 ar = toolprefix + "ar" 53 ar = toolprefix + "ar"
52 ld = cxx 54 ld = cxx
53 } 55 }
54 56
55 nacl_toolchain("newlib_x64") { 57 nacl_toolchain("newlib_x64") {
56 toolchain_package = "nacl_x86_newlib" 58 toolchain_package = "nacl_x86_newlib"
57 toolchain_revision = nacl_x86_newlib_rev 59 toolchain_revision = nacl_x86_newlib_rev
58 toolchain_cpu = "x64" 60 toolchain_cpu = "x64"
59 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-" 61 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-"
62 is_clang = false
60 63
61 cc = toolprefix + "gcc" 64 cc = toolprefix + "gcc"
62 cxx = toolprefix + "g++" 65 cxx = toolprefix + "g++"
63 ar = toolprefix + "ar" 66 ar = toolprefix + "ar"
64 ld = cxx 67 ld = cxx
65 } 68 }
66 69
67 nacl_toolchain("newlib_pnacl") { 70 nacl_toolchain("newlib_pnacl") {
68 toolchain_package = "pnacl_newlib" 71 toolchain_package = "pnacl_newlib"
69 toolchain_revision = pnacl_newlib_rev 72 toolchain_revision = pnacl_newlib_rev
(...skipping 12 matching lines...) Expand all
82 finalized_file = "{{root_out_dir}}/{{target_output_name}}.pexe" 85 finalized_file = "{{root_out_dir}}/{{target_output_name}}.pexe"
83 postlink = "$finalize $nonfinal_file -o $finalized_file" 86 postlink = "$finalize $nonfinal_file -o $finalized_file"
84 link_outputs = [ finalized_file ] 87 link_outputs = [ finalized_file ]
85 } 88 }
86 89
87 nacl_toolchain("glibc_x86") { 90 nacl_toolchain("glibc_x86") {
88 toolchain_package = "nacl_x86_glibc" 91 toolchain_package = "nacl_x86_glibc"
89 toolchain_revision = nacl_x86_glibc_rev 92 toolchain_revision = nacl_x86_glibc_rev
90 toolchain_cpu = "x86" 93 toolchain_cpu = "x86"
91 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-" 94 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-"
95 is_clang = false
92 96
93 cc = toolprefix + "gcc" 97 cc = toolprefix + "gcc"
94 cxx = toolprefix + "g++" 98 cxx = toolprefix + "g++"
95 ar = toolprefix + "ar" 99 ar = toolprefix + "ar"
96 ld = cxx 100 ld = cxx
97 } 101 }
98 102
99 nacl_toolchain("glibc_x64") { 103 nacl_toolchain("glibc_x64") {
100 toolchain_package = "nacl_x86_glibc" 104 toolchain_package = "nacl_x86_glibc"
101 toolchain_revision = nacl_x86_glibc_rev 105 toolchain_revision = nacl_x86_glibc_rev
102 toolchain_cpu = "x64" 106 toolchain_cpu = "x64"
103 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-" 107 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-"
108 is_clang = false
104 109
105 cc = toolprefix + "gcc" 110 cc = toolprefix + "gcc"
106 cxx = toolprefix + "g++" 111 cxx = toolprefix + "g++"
107 ar = toolprefix + "ar" 112 ar = toolprefix + "ar"
108 ld = cxx 113 ld = cxx
109 } 114 }
110 115
111 nacl_toolchain("clang_newlib_x86") { 116 nacl_toolchain("clang_newlib_x86") {
112 toolchain_package = "pnacl_newlib" 117 toolchain_package = "pnacl_newlib"
113 toolchain_revision = pnacl_newlib_rev 118 toolchain_revision = pnacl_newlib_rev
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 "//native_client/src/tools/tls_edit:tls_edit($host_toolchain)", 184 "//native_client/src/tools/tls_edit:tls_edit($host_toolchain)",
180 ] 185 ]
181 } 186 }
182 187
183 # Uses newlib to match the Chrome build. 188 # Uses newlib to match the Chrome build.
184 nacl_toolchain("irt_arm") { 189 nacl_toolchain("irt_arm") {
185 toolchain_package = "nacl_arm_newlib" 190 toolchain_package = "nacl_arm_newlib"
186 toolchain_revision = nacl_arm_newlib_rev 191 toolchain_revision = nacl_arm_newlib_rev
187 toolchain_cpu = "arm" 192 toolchain_cpu = "arm"
188 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/arm-nacl-" 193 toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/arm-nacl-"
194 is_clang = false
189 195
190 cc = toolprefix + "gcc" 196 cc = toolprefix + "gcc"
191 cxx = toolprefix + "g++" 197 cxx = toolprefix + "g++"
192 ar = toolprefix + "ar" 198 ar = toolprefix + "ar"
193 readelf = toolprefix + "readelf" 199 readelf = toolprefix + "readelf"
194 200
195 # Some IRT implementations (notably, Chromium's) contain C++ code, 201 # Some IRT implementations (notably, Chromium's) contain C++ code,
196 # so we need to link w/ the C++ linker. 202 # so we need to link w/ the C++ linker.
197 ld = "${python_path} ${link_irt} --tls-edit=tls_edit --link-cmd=${cxx} --reade lf-cmd=${readelf}" 203 ld = "${python_path} ${link_irt} --tls-edit=tls_edit --link-cmd=${cxx} --reade lf-cmd=${readelf}"
198 204
199 # TODO(ncbray): depend on link script 205 # TODO(ncbray): depend on link script
200 deps = [ 206 deps = [
201 "//native_client/src/tools/tls_edit:tls_edit($host_toolchain)", 207 "//native_client/src/tools/tls_edit:tls_edit($host_toolchain)",
202 ] 208 ]
203 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698