use lld-link any time we have it
Might open up some neat options like LTO builds. If nothing it's nice to use each whole toolchain consistently. Move around some bonus quotes a bit. LLD doesn't understand /DEBUG:FASTLINK. Change-Id: I27e3c97acea6980c5bd006394aebb1e103007edd Reviewed-on: https://skia-review.googlesource.com/c/175981 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
0a7e58f4c9
commit
a6e0c2b19c
@ -427,10 +427,8 @@ config("debug_symbols") {
|
||||
]
|
||||
} else if (is_win) {
|
||||
cflags = [ "/Z7" ]
|
||||
ldflags = [ "/DEBUG:FASTLINK" ]
|
||||
if (is_clang) {
|
||||
# /DEBUG:FASTLINK requires every object file to have standalone debug information.
|
||||
cflags += [ "-fstandalone-debug" ]
|
||||
if (!is_clang) {
|
||||
ldflags = [ "/DEBUG:FASTLINK" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "-g" ]
|
||||
|
@ -53,9 +53,6 @@ toolchain("msvc") {
|
||||
|
||||
cl_m32_flag = ""
|
||||
|
||||
# Use the Microsoft link tools except when clang_win on a non-Windows host.
|
||||
lib = "\"$bin/lib.exe\""
|
||||
link = "\"$bin/link.exe\""
|
||||
if (clang_win != "") {
|
||||
if (target_cpu == "x86") {
|
||||
# cl.exe knows implicitly by the choice of executable that it's targeting
|
||||
@ -64,14 +61,18 @@ toolchain("msvc") {
|
||||
cl_m32_flag = "-m32"
|
||||
}
|
||||
if (host_os == "win") {
|
||||
cl = "$clang_win/bin/clang-cl.exe"
|
||||
cl = "\"$clang_win/bin/clang-cl.exe\""
|
||||
lib = "\"$clang_win/bin/lld-link.exe\" /lib"
|
||||
link = "\"$clang_win/bin/lld-link.exe\""
|
||||
} else {
|
||||
cl = "$clang_win/bin/clang-cl"
|
||||
lib = "$clang_win/bin/lld-link /lib"
|
||||
link = "$clang_win/bin/lld-link"
|
||||
}
|
||||
} else {
|
||||
cl = "$bin/cl.exe"
|
||||
cl = "\"$bin/cl.exe\""
|
||||
lib = "\"$bin/lib.exe\""
|
||||
link = "\"$bin/link.exe\""
|
||||
}
|
||||
|
||||
tool("asm") {
|
||||
@ -91,7 +92,7 @@ toolchain("msvc") {
|
||||
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
|
||||
|
||||
# Label names may have spaces so pdbname must be quoted.
|
||||
command = "$env_setup $cc_wrapper \"$cl\" /nologo /showIncludes /FC {{defines}} {{include_dirs}} {{cflags}} $cl_m32_flag {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
|
||||
command = "$env_setup $cc_wrapper $cl /nologo /showIncludes /FC {{defines}} {{include_dirs}} {{cflags}} $cl_m32_flag {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
|
||||
depsformat = "msvc"
|
||||
outputs = [
|
||||
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
|
||||
@ -104,7 +105,7 @@ toolchain("msvc") {
|
||||
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
|
||||
|
||||
# Label names may have spaces so pdbname must be quoted.
|
||||
command = "$env_setup $cc_wrapper \"$cl\" /nologo /showIncludes /FC {{defines}} {{include_dirs}} {{cflags}} $cl_m32_flag {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
|
||||
command = "$env_setup $cc_wrapper $cl /nologo /showIncludes /FC {{defines}} {{include_dirs}} {{cflags}} $cl_m32_flag {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
|
||||
depsformat = "msvc"
|
||||
outputs = [
|
||||
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
|
||||
|
Loading…
Reference in New Issue
Block a user