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

Unified Diff: build/config/compiler/compiler.gni

Issue 2023703002: Beginning work on GN build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Really add //build. Add dart_bootstrap rule. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/crypto.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/compiler.gni
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
new file mode 100644
index 0000000000000000000000000000000000000000..13109c28639bf43b10415136942e174fefad33b3
--- /dev/null
+++ b/build/config/compiler/compiler.gni
@@ -0,0 +1,74 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/android/config.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromecast_build.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//build/toolchain/toolchain.gni")
+
+declare_args() {
+ # How many symbols to include in the build. This affects the performance of
+ # the build since the symbols are large and dealing with them is slow.
+ # 2 means regular build with symbols.
+ # 1 means minimal symbols, usually enough for backtraces only.
+ # 0 means no symbols.
+ # -1 means auto-set according to debug/release and platform.
+ symbol_level = -1
+
+ # Compile in such a way as to enable profiling of the generated code. For
+ # example, don't omit the frame pointer and leave in symbols.
+ enable_profiling = false
+
+ # Specify the current PGO phase, only used for the Windows MSVS build. Here's
+ # the different values that can be used:
+ # 0 : Means that PGO is turned off.
+ # 1 : Used during the PGI (instrumentation) phase.
+ # 2 : Used during the PGO (optimization) phase.
+ #
+ # TODO(sebmarchand): Add support for the PGU (update) phase.
+ chrome_pgo_phase = 0
+
+ # Whether or not the official builds should be build with full WPO.
+ full_wpo_on_official = false
+}
+
+declare_args() {
+ # Whether to use the gold linker from binutils instead of lld or bfd.
+ use_gold = !use_lld && !(is_chromecast && is_linux &&
+ (current_cpu == "arm" || current_cpu == "mipsel")) &&
+ ((is_linux && (current_cpu == "x64" || current_cpu == "x86" ||
+ current_cpu == "arm")) ||
+ (is_android && (current_cpu == "x86" || current_cpu == "x64" ||
+ current_cpu == "arm")))
+}
+
+# If it wasn't manually set, set to an appropriate default.
+assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level")
+if (symbol_level == -1) {
+ if (is_android && use_order_profiling) {
+ # With instrumentation enabled, debug info puts libchrome.so over 4gb, which
+ # causes the linker to produce an invalid ELF. http://crbug.com/574476
+ symbol_level = 0
+ } else if (is_win && is_clang && !using_sanitizer) {
+ # TODO(thakis): Remove this again once building with clang/win and
+ # debug info doesn't make link.exe run for hours.
+ symbol_level = 1
+ } else if (!is_linux || is_debug || is_official_build || is_chromecast) {
+ # Linux is slowed by having symbols as part of the target binary, whereas
+ # Mac and Windows have them separate, so in Release Linux, default them off,
+ # but keep them on for Official builds and Chromecast builds.
+ symbol_level = 2
+ } else if (using_sanitizer) {
+ # Sanitizers require symbols for filename suppressions to work.
+ symbol_level = 1
+ } else {
+ symbol_level = 0
+ }
+}
+
+# PGO requires full WPO.
+if (chrome_pgo_phase > 0) {
+ full_wpo_on_official = true
+}
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/crypto.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698