OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium 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 # Base compiler configuration. | 5 # Base compiler configuration. |
6 config("compiler") { | 6 config("compiler") { |
7 include_dirs = [ "//", root_gen_dir ] | 7 include_dirs = [ "//", root_gen_dir ] |
8 if (is_win) { | 8 if (is_win) { |
9 cflags = [ | 9 cflags = [ |
10 "/Gy", # Enable function-level linking. | 10 "/Gy", # Enable function-level linking. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 # ------------------------------------ | 76 # ------------------------------------ |
77 if (is_linux) { | 77 if (is_linux) { |
78 cflags += [ | 78 cflags += [ |
79 "-fPIC", | 79 "-fPIC", |
80 "-pthread", | 80 "-pthread", |
81 "-pipe", # Use pipes for communicating between sub-processes. Faster. | 81 "-pipe", # Use pipes for communicating between sub-processes. Faster. |
82 ] | 82 ] |
83 | 83 |
84 # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of | 84 # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of |
85 # address space, and it doesn't support cross-compiling). | 85 # address space, and it doesn't support cross-compiling). |
86 if (cpu_arch == "ia64") { | 86 if (cpu_arch == "x64") { |
87 gold_path = rebase_path("//third_party/gold", ".", root_build_dir) | 87 gold_path = rebase_path("//third_party/gold", ".", root_build_dir) |
88 ldflags += [ | 88 ldflags += [ |
89 "-B$gold_path", | 89 "-B$gold_path", |
90 | 90 |
91 # There seems to be a conflict of --icf and -pie in gold which can | 91 # There seems to be a conflict of --icf and -pie in gold which can |
92 # generate crashy binaries. As a security measure, -pie takes | 92 # generate crashy binaries. As a security measure, -pie takes |
93 # precendence for now. | 93 # precendence for now. |
94 # TODO(brettw) common.gypi has this only for target toolset. | 94 # TODO(brettw) common.gypi has this only for target toolset. |
95 #"-Wl,--icf=safe", | 95 #"-Wl,--icf=safe", |
96 "-Wl,--icf=none", | 96 "-Wl,--icf=none", |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 } else { | 387 } else { |
388 cflags = [ "-g1" ] | 388 cflags = [ "-g1" ] |
389 } | 389 } |
390 } | 390 } |
391 | 391 |
392 config("no_symbols") { | 392 config("no_symbols") { |
393 if (!is_win) { | 393 if (!is_win) { |
394 cflags = [ "-g0" ] | 394 cflags = [ "-g0" ] |
395 } | 395 } |
396 } | 396 } |
OLD | NEW |