| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 config("release") { | 147 config("release") { |
| 148 cflags = [ "-O3" ] | 148 cflags = [ "-O3" ] |
| 149 defines = [ "NDEBUG" ] | 149 defines = [ "NDEBUG" ] |
| 150 } | 150 } |
| 151 | 151 |
| 152 config("executable") { | 152 config("executable") { |
| 153 if (is_mac) { | 153 if (is_mac) { |
| 154 ldflags = [ "-Wl,-rpath,@loader_path/." ] | 154 ldflags = [ "-Wl,-rpath,@loader_path/." ] |
| 155 } else if (is_linux) { | 155 } else if (is_linux) { |
| 156 ldflags = [ "-Wl,-rpath,\$ORIGIN" ] | 156 ldflags = [ |
| 157 "-rdynamic", |
| 158 "-Wl,-rpath,\$ORIGIN", |
| 159 ] |
| 157 } | 160 } |
| 158 } | 161 } |
| 159 | 162 |
| 160 toolchain("gcc_like") { | 163 toolchain("gcc_like") { |
| 161 lib_switch = "-l" | 164 lib_switch = "-l" |
| 162 lib_dir_switch = "-L" | 165 lib_dir_switch = "-L" |
| 163 | 166 |
| 164 tool("cc") { | 167 tool("cc") { |
| 165 depfile = "{{output}}.d" | 168 depfile = "{{output}}.d" |
| 166 command = "$compiler_prefix $cc -MMD -MF $depfile {{defines}} {{include_dirs
}} {{cflags}} {{cflags_c}} $extra_cflags $extra_cflags_c -c {{source}} -o {{outp
ut}}" | 169 command = "$compiler_prefix $cc -MMD -MF $depfile {{defines}} {{include_dirs
}} {{cflags}} {{cflags_c}} $extra_cflags $extra_cflags_c -c {{source}} -o {{outp
ut}}" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 233 } |
| 231 | 234 |
| 232 tool("stamp") { | 235 tool("stamp") { |
| 233 command = "touch {{output}}" | 236 command = "touch {{output}}" |
| 234 } | 237 } |
| 235 | 238 |
| 236 tool("copy") { | 239 tool("copy") { |
| 237 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}})" |
| 238 } | 241 } |
| 239 } | 242 } |
| OLD | NEW |