| OLD | NEW |
| 1 # Copyright 2016 Google Inc. | 1 # Copyright 2016 Google Inc. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 declare_args() { | 6 declare_args() { |
| 7 ar = "ar" | 7 ar = "ar" |
| 8 cc = "cc" | 8 cc = "cc" |
| 9 cxx = "c++" | 9 cxx = "c++" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 config("no_rtti") { | 25 config("no_rtti") { |
| 26 if (sanitize != "ASAN") { # -fsanitize=vptr requires RTTI | 26 if (sanitize != "ASAN") { # -fsanitize=vptr requires RTTI |
| 27 cflags_cc = [ "-fno-rtti" ] | 27 cflags_cc = [ "-fno-rtti" ] |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 | 30 |
| 31 config("default") { | 31 config("default") { |
| 32 cflags = [ | 32 cflags = [ |
| 33 "-O1", | 33 "-O1", |
| 34 "-g", | |
| 35 "-fstrict-aliasing", | 34 "-fstrict-aliasing", |
| 36 "-fPIC", | 35 "-fPIC", |
| 37 "-fvisibility=hidden", | 36 "-fvisibility=hidden", |
| 38 | 37 |
| 39 "-Werror", | 38 "-Werror", |
| 40 "-Wall", | 39 "-Wall", |
| 41 "-Wextra", | 40 "-Wextra", |
| 42 "-Winit-self", | 41 "-Winit-self", |
| 43 "-Wpointer-arith", | 42 "-Wpointer-arith", |
| 44 "-Wsign-compare", | 43 "-Wsign-compare", |
| 45 "-Wvla", | 44 "-Wvla", |
| 46 | 45 |
| 47 "-Wno-deprecated-declarations", | 46 "-Wno-deprecated-declarations", |
| 48 "-Wno-unused-parameter", | 47 "-Wno-unused-parameter", |
| 49 ] | 48 ] |
| 50 cflags_cc = [ | 49 cflags_cc = [ |
| 51 "-std=c++11", | 50 "-std=c++11", |
| 52 "-fno-exceptions", | 51 "-fno-exceptions", |
| 53 "-fno-threadsafe-statics", | 52 "-fno-threadsafe-statics", |
| 54 "-fvisibility-inlines-hidden", | 53 "-fvisibility-inlines-hidden", |
| 55 | 54 |
| 56 "-Wnon-virtual-dtor", | 55 "-Wnon-virtual-dtor", |
| 57 ] | 56 ] |
| 58 ldflags = [] | 57 ldflags = [] |
| 59 | 58 |
| 59 # It's annoying to wait for full debug symbols to push over |
| 60 # to Android devices. -gline-tables-only is a lot slimmer. |
| 61 if (is_android) { |
| 62 cflags += [ "-gline-tables-only" ] |
| 63 } else { |
| 64 cflags += [ "-g" ] |
| 65 } |
| 66 |
| 60 if (current_cpu == "arm") { | 67 if (current_cpu == "arm") { |
| 61 cflags += [ | 68 cflags += [ |
| 62 "-march=armv7-a", | 69 "-march=armv7-a", |
| 63 "-mfpu=neon", | 70 "-mfpu=neon", |
| 64 "-mthumb", | 71 "-mthumb", |
| 65 ] | 72 ] |
| 66 } else if (current_cpu == "mipsel") { | 73 } else if (current_cpu == "mipsel") { |
| 67 cflags += [ | 74 cflags += [ |
| 68 "-march=mips32r2", | 75 "-march=mips32r2", |
| 69 "-mdspr2", | 76 "-mdspr2", |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 } | 228 } |
| 222 | 229 |
| 223 tool("stamp") { | 230 tool("stamp") { |
| 224 command = "touch {{output}}" | 231 command = "touch {{output}}" |
| 225 } | 232 } |
| 226 | 233 |
| 227 tool("copy") { | 234 tool("copy") { |
| 228 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &&
cp -af {{source}} {{output}})" | 235 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &&
cp -af {{source}} {{output}})" |
| 229 } | 236 } |
| 230 } | 237 } |
| OLD | NEW |