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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 2784063002: Config changes to support target_os="fuchsia" (Closed)
Patch Set: . Created 3 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 unified diff | Download patch
OLDNEW
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 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/chromecast_build.gni") 7 import("//build/config/chromecast_build.gni")
8 import("//build/config/compiler/compiler.gni") 8 import("//build/config/compiler/compiler.gni")
9 import("//build/toolchain/cc_wrapper.gni") 9 import("//build/toolchain/cc_wrapper.gni")
10 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } else if (is_android) { 162 } else if (is_android) {
163 configs += [ "//build/config/android:compiler" ] 163 configs += [ "//build/config/android:compiler" ]
164 } else if (is_linux) { 164 } else if (is_linux) {
165 configs += [ "//build/config/linux:compiler" ] 165 configs += [ "//build/config/linux:compiler" ]
166 } else if (is_nacl) { 166 } else if (is_nacl) {
167 configs += [ "//build/config/nacl:compiler" ] 167 configs += [ "//build/config/nacl:compiler" ]
168 } else if (is_mac) { 168 } else if (is_mac) {
169 configs += [ "//build/config/mac:compiler" ] 169 configs += [ "//build/config/mac:compiler" ]
170 } else if (is_ios) { 170 } else if (is_ios) {
171 configs += [ "//build/config/ios:compiler" ] 171 configs += [ "//build/config/ios:compiler" ]
172 } else if (is_fuchsia) {
173 configs += [ "//build/config/fuchsia:compiler" ]
172 } else if (current_os == "aix") { 174 } else if (current_os == "aix") {
173 configs += [ "//build/config/aix:compiler" ] 175 configs += [ "//build/config/aix:compiler" ]
174 } 176 }
175 177
176 # See the definitions below. 178 # See the definitions below.
177 configs += [ 179 configs += [
178 ":compiler_cpu_abi", 180 ":compiler_cpu_abi",
179 ":compiler_codegen", 181 ":compiler_codegen",
180 ] 182 ]
181 183
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 ] 304 ]
303 defines += [ "NO_UNWIND_TABLES" ] 305 defines += [ "NO_UNWIND_TABLES" ]
304 } else { 306 } else {
305 cflags += [ "-funwind-tables" ] 307 cflags += [ "-funwind-tables" ]
306 } 308 }
307 } 309 }
308 } 310 }
309 311
310 # Linux/Android common flags setup. 312 # Linux/Android common flags setup.
311 # --------------------------------- 313 # ---------------------------------
312 if (is_linux || is_android) { 314 if (is_linux || is_android || is_fuchsia) {
313 if (use_pic) { 315 if (use_pic) {
314 cflags += [ "-fPIC" ] 316 cflags += [ "-fPIC" ]
315 ldflags += [ "-fPIC" ] 317 ldflags += [ "-fPIC" ]
316 } 318 }
317 319
318 # Use pipes for communicating between sub-processes. Faster. 320 # Use pipes for communicating between sub-processes. Faster.
319 cflags += [ "-pipe" ] 321 cflags += [ "-pipe" ]
320 322
321 ldflags += [ 323 ldflags += [
322 "-Wl,-z,noexecstack", 324 "-Wl,-z,noexecstack",
323 "-Wl,-z,now", 325 "-Wl,-z,now",
324 "-Wl,-z,relro", 326 "-Wl,-z,relro",
325 ] 327 ]
326 if (!using_sanitizer) { 328 if (!using_sanitizer) {
327 if (!use_cfi_diag) { 329 if (!use_cfi_diag) {
328 ldflags += [ "-Wl,-z,defs" ] 330 ldflags += [ "-Wl,-z,defs" ]
329 } 331 }
330 332
331 # Functions interposed by the sanitizers can make ld think 333 # Functions interposed by the sanitizers can make ld think
332 # that some libraries aren't needed when they actually are, 334 # that some libraries aren't needed when they actually are,
333 # http://crbug.com/234010. As workaround, disable --as-needed. 335 # http://crbug.com/234010. As workaround, disable --as-needed.
334 if (!is_nacl && !is_android) { 336 if (!is_nacl && !is_android) {
335 # TODO(pcc): Fix linker bug which requires us to link pthread 337 # TODO(pcc): Fix linker bug which requires us to link pthread
336 # unconditionally here (crbug.com/623236). 338 # unconditionally here (crbug.com/623236).
337 ldflags += [ 339 ldflags += [
338 "-Wl,--no-as-needed", 340 "-Wl,--no-as-needed",
339 "-lpthread", 341 "-lpthread",
340 ] 342 ]
341 } 343 }
342 ldflags += [ "-Wl,--as-needed" ]
Nico 2017/05/11 17:43:37 Removing this probably wasn't intentional
343 } 344 }
344 } 345 }
345 346
346 # Linux-specific compiler flags setup. 347 # Linux-specific compiler flags setup.
347 # ------------------------------------ 348 # ------------------------------------
348 if (is_android && is_clang) { 349 if (is_android && is_clang) {
349 _rebased_android_toolchain_root = 350 _rebased_android_toolchain_root =
350 rebase_path(android_toolchain_root, root_build_dir) 351 rebase_path(android_toolchain_root, root_build_dir)
351 352
352 # Let clang find the linker in the NDK. 353 # Let clang find the linker in the NDK.
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 1752
1752 if (is_ios || is_mac) { 1753 if (is_ios || is_mac) {
1753 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1754 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1754 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1755 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1755 config("enable_arc") { 1756 config("enable_arc") {
1756 common_flags = [ "-fobjc-arc" ] 1757 common_flags = [ "-fobjc-arc" ]
1757 cflags_objc = common_flags 1758 cflags_objc = common_flags
1758 cflags_objcc = common_flags 1759 cflags_objcc = common_flags
1759 } 1760 }
1760 } 1761 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698