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 21 matching lines...) Expand all Loading... |
32 # It's annoying to wait for full debug symbols to push over | 32 # It's annoying to wait for full debug symbols to push over |
33 # to Android devices. -gline-tables-only is a lot slimmer. | 33 # to Android devices. -gline-tables-only is a lot slimmer. |
34 if (is_android) { | 34 if (is_android) { |
35 cflags = [ "-gline-tables-only" ] | 35 cflags = [ "-gline-tables-only" ] |
36 } else { | 36 } else { |
37 cflags = [ "-g" ] | 37 cflags = [ "-g" ] |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 config("default") { | 41 config("default") { |
42 asmflags = [] | |
43 cflags = [ | 42 cflags = [ |
44 "-O1", | 43 "-O1", |
45 "-fstrict-aliasing", | 44 "-fstrict-aliasing", |
46 "-fPIC", | 45 "-fPIC", |
47 "-fvisibility=hidden", | 46 "-fvisibility=hidden", |
48 | 47 |
49 "-Werror", | 48 "-Werror", |
50 "-Wall", | 49 "-Wall", |
51 "-Wextra", | 50 "-Wextra", |
52 "-Winit-self", | 51 "-Winit-self", |
(...skipping 18 matching lines...) Expand all Loading... |
71 cflags += [ | 70 cflags += [ |
72 "-march=armv7-a", | 71 "-march=armv7-a", |
73 "-mfpu=neon", | 72 "-mfpu=neon", |
74 "-mthumb", | 73 "-mthumb", |
75 ] | 74 ] |
76 } else if (current_cpu == "mipsel") { | 75 } else if (current_cpu == "mipsel") { |
77 cflags += [ | 76 cflags += [ |
78 "-march=mips32r2", | 77 "-march=mips32r2", |
79 "-mdspr2", | 78 "-mdspr2", |
80 ] | 79 ] |
81 } else if (current_cpu == "x86") { | |
82 asmflags += [ "-m32" ] | |
83 cflags += [ | |
84 "-m32", | |
85 "-msse2", | |
86 "-mfpmath=sse", | |
87 ] | |
88 ldflags += [ "-m32" ] | |
89 } | 80 } |
90 | 81 |
91 if (is_android) { | 82 if (is_android) { |
92 asmflags = [ | 83 asmflags = [ |
93 "--target=$ndk_target", | 84 "--target=$ndk_target", |
94 "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin", | 85 "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin", |
95 ] | 86 ] |
96 cflags += [ | 87 cflags += [ |
97 "--sysroot=$ndk/platforms/$ndk_platform", | 88 "--sysroot=$ndk/platforms/$ndk_platform", |
98 "--target=$ndk_target", | 89 "--target=$ndk_target", |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 } | 233 } |
243 | 234 |
244 tool("stamp") { | 235 tool("stamp") { |
245 command = "touch {{output}}" | 236 command = "touch {{output}}" |
246 } | 237 } |
247 | 238 |
248 tool("copy") { | 239 tool("copy") { |
249 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &&
cp -af {{source}} {{output}})" | 240 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &&
cp -af {{source}} {{output}})" |
250 } | 241 } |
251 } | 242 } |
OLD | NEW |