forked from OSchip/llvm-project
Address Peter's comments.
This commit is contained in:
parent
184b437699
commit
1bfb5b8e36
|
@ -1,19 +1,13 @@
|
||||||
import("//llvm/utils/gn/build/libs/pthread/enable.gni")
|
import("//llvm/utils/gn/build/libs/pthread/enable.gni")
|
||||||
|
|
||||||
config("pthread_config") {
|
config("pthread_config") {
|
||||||
visibility = [ ":pthread" ]
|
|
||||||
libs = [ "pthread" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
config("pthread_link_time_config") {
|
|
||||||
visibility = [ ":pthread" ]
|
visibility = [ ":pthread" ]
|
||||||
ldflags = [ "-pthread" ]
|
ldflags = [ "-pthread" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
group("pthread") {
|
group("pthread") {
|
||||||
# On Android, bionic has built-in support for pthreads.
|
# On Android, bionic has built-in support for pthreads.
|
||||||
if (llvm_enable_threads && current_os != "win" && current_os != "android") {
|
if (llvm_enable_threads && current_os != "win") {
|
||||||
public_configs = [ ":pthread_config" ]
|
all_dependent_configs = [ ":pthread_config" ]
|
||||||
all_dependent_configs = [ ":pthread_link_time_config" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ template("unix_toolchain") {
|
||||||
if (current_os == "mac") {
|
if (current_os == "mac") {
|
||||||
command = "$ld {{ldflags}} -o $outfile {{inputs}} {{libs}}"
|
command = "$ld {{ldflags}} -o $outfile {{inputs}} {{libs}}"
|
||||||
} else {
|
} else {
|
||||||
command = "$ld {{ldflags}} -o $outfile -Wl,--start-group {{inputs}} {{libs}} -Wl,--end-group"
|
command = "$ld {{ldflags}} -o $outfile -Wl,--start-group {{libs}} {{inputs}} -Wl,--end-group"
|
||||||
}
|
}
|
||||||
description = "LINK $outfile"
|
description = "LINK $outfile"
|
||||||
outputs = [ outfile ]
|
outputs = [ outfile ]
|
||||||
|
|
Loading…
Reference in New Issue