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

Unified Diff: build/toolchain/cros/BUILD.gn

Issue 1491463002: build CrOS chrome with gn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« build/config/BUILDCONFIG.gn ('K') | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/cros/BUILD.gn
diff --git a/build/toolchain/cros/BUILD.gn b/build/toolchain/cros/BUILD.gn
index 5db3c200889678598ddff608aabcd76e0dfde9ed..4aee3e5d4d84403866d3a9a1a095eb7fd5ba8bad 100644
--- a/build/toolchain/cros/BUILD.gn
+++ b/build/toolchain/cros/BUILD.gn
@@ -17,20 +17,61 @@ declare_args() {
cros_target_ar = ""
}
-gcc_toolchain("target") {
- assert(cros_target_cc != "", "Must provide target CC.")
- assert(cros_target_cxx != "", "Must provide target CXX.")
- assert(cros_target_ar != "", "Must provide target AR.")
+clang_toolchain("clang_x64") {
+ toolchain_cpu = "x64"
+ toolchain_os = "linux"
+}
- cc = "${cros_target_cc}"
- cxx = "${cros_target_cxx}"
+gcc_toolchain("x64") {
+ # These defaults permit building on a Linux host.
+ cc = "gcc"
+ cxx = "g++"
+ ar = "ar"
- ar = "${cros_target_ar}"
+ # But to build for a specific board, the cros_* args will need to be defined.
+ if (cros_target_cc != "") {
+ cc = "${cros_target_cc}"
+ }
+ if (cros_target_cxx != "") {
+ cxx = "${cros_target_cxx}"
+ }
+ if (cros_target_ar != "") {
+ ar = "${cros_target_ar}"
+ }
ld = cxx
- toolchain_cpu = "${target_cpu}"
+ toolchain_cpu = "x64"
toolchain_os = "linux"
is_clang = is_clang
use_ccache = false
- use_goma = false
+}
+
+clang_toolchain("clang_x86") {
+ toolchain_cpu = "x86"
+ toolchain_os = "linux"
+}
+
+gcc_toolchain("x86") {
+ cc = "gcc"
+ cxx = "g++"
+
+ readelf = "readelf"
+ nm = "nm"
+ ar = "ar"
+ ld = cxx
+
+ # To build for a specific board, the cros_* args will need to be defined.
+ if (cros_target_cc != "") {
+ cc = "${cros_target_cc}"
+ }
+ if (cros_target_cxx != "") {
+ cxx = "${cros_target_cxx}"
+ }
+ if (cros_target_ar != "") {
+ ar = "${cros_target_ar}"
+ }
+
+ toolchain_cpu = "x86"
+ toolchain_os = "linux"
+ is_clang = false
}
« build/config/BUILDCONFIG.gn ('K') | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698