OLD | NEW |
(Empty) | |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import("//build/config/sanitizers/sanitizers.gni") |
| 6 import("//build/toolchain/toolchain.gni") |
| 7 |
| 8 # This is included by reference in the //build/config/compiler config that |
| 9 # is applied to all targets. It is here to separate out the logic. |
| 10 |
| 11 config("compiler") { |
| 12 # These flags are shared between the C compiler and linker. |
| 13 defines = [ |
| 14 "_LINUX_SOURCE_COMPAT=1", |
| 15 "__STDC_FORMAT_MACROS", |
| 16 "_ALL_SOURCE=1", |
| 17 ] |
| 18 |
| 19 cflags = [ |
| 20 "-Wall", |
| 21 "-Wno-unused-parameter", |
| 22 "-pthread", |
| 23 "-Wmissing-field-initializers", |
| 24 "-Wno-uninitialized", |
| 25 "-mcpu=power5+", |
| 26 "-mfprnd", |
| 27 "-mno-popcntb", |
| 28 "-maix64", |
| 29 "-fdata-sections", |
| 30 "-ffunction-sections", |
| 31 "-O3", |
| 32 |
| 33 # "-Werror" |
| 34 # We need to find a way to fix the TOC warnings if we want to enable this. |
| 35 ] |
| 36 |
| 37 cflags_cc = [ |
| 38 "-std=gnu++11", |
| 39 "-fno-rtti", |
| 40 "-fno-exceptions", |
| 41 "-Wno-narrowing", |
| 42 "-Wnon-virtual-dtor", |
| 43 ] |
| 44 |
| 45 ldflags = [ |
| 46 "-pthread", |
| 47 "-maix64", |
| 48 "-Wl,-bbigtoc", |
| 49 ] |
| 50 } |
OLD | NEW |