| 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 = [] |
| 42 cflags = [ | 43 cflags = [ |
| 43 "-O1", | 44 "-O1", |
| 44 "-fstrict-aliasing", | 45 "-fstrict-aliasing", |
| 45 "-fPIC", | 46 "-fPIC", |
| 46 "-fvisibility=hidden", | 47 "-fvisibility=hidden", |
| 47 | 48 |
| 48 "-Werror", | 49 "-Werror", |
| 49 "-Wall", | 50 "-Wall", |
| 50 "-Wextra", | 51 "-Wextra", |
| 51 "-Winit-self", | 52 "-Winit-self", |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 cflags += [ | 71 cflags += [ |
| 71 "-march=armv7-a", | 72 "-march=armv7-a", |
| 72 "-mfpu=neon", | 73 "-mfpu=neon", |
| 73 "-mthumb", | 74 "-mthumb", |
| 74 ] | 75 ] |
| 75 } else if (current_cpu == "mipsel") { | 76 } else if (current_cpu == "mipsel") { |
| 76 cflags += [ | 77 cflags += [ |
| 77 "-march=mips32r2", | 78 "-march=mips32r2", |
| 78 "-mdspr2", | 79 "-mdspr2", |
| 79 ] | 80 ] |
| 81 } else if (current_cpu == "x86") { |
| 82 asmflags += [ "-m32" ] |
| 83 cflags += [ |
| 84 "-m32", |
| 85 "-msse2", |
| 86 "-mfpmath=sse", |
| 87 ] |
| 88 ldflags += [ "-m32" ] |
| 80 } | 89 } |
| 81 | 90 |
| 82 if (is_android) { | 91 if (is_android) { |
| 83 asmflags = [ | 92 asmflags += [ |
| 84 "--target=$ndk_target", | 93 "--target=$ndk_target", |
| 85 "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin", | 94 "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin", |
| 86 ] | 95 ] |
| 87 cflags += [ | 96 cflags += [ |
| 88 "--sysroot=$ndk/platforms/$ndk_platform", | 97 "--sysroot=$ndk/platforms/$ndk_platform", |
| 89 "--target=$ndk_target", | 98 "--target=$ndk_target", |
| 90 "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin", | 99 "-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin", |
| 91 ] | 100 ] |
| 92 cflags_cc += [ | 101 cflags_cc += [ |
| 93 "-isystem$ndk/sources/android/support/include", | 102 "-isystem$ndk/sources/android/support/include", |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 242 } |
| 234 | 243 |
| 235 tool("stamp") { | 244 tool("stamp") { |
| 236 command = "touch {{output}}" | 245 command = "touch {{output}}" |
| 237 } | 246 } |
| 238 | 247 |
| 239 tool("copy") { | 248 tool("copy") { |
| 240 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &&
cp -af {{source}} {{output}})" | 249 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &&
cp -af {{source}} {{output}})" |
| 241 } | 250 } |
| 242 } | 251 } |
| OLD | NEW |