2020-06-30 22:23:07 +00:00
|
|
|
config("compiler_defaults") {
|
|
|
|
if (current_os == "linux") {
|
|
|
|
cflags = [
|
|
|
|
"-fPIC",
|
|
|
|
"-pthread",
|
|
|
|
"-g",
|
|
|
|
]
|
|
|
|
|
|
|
|
cflags_cc = [
|
|
|
|
"-std=c++17",
|
2021-10-27 12:19:10 +00:00
|
|
|
"-I../../src",
|
2020-06-30 22:23:07 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
config("executable_ldconfig") {
|
|
|
|
ldflags = [
|
|
|
|
"-Wl,-rpath=\$ORIGIN/",
|
|
|
|
"-Wl,-rpath-link=",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("debug") {
|
|
|
|
defines = [ "_DEBUG" ]
|
|
|
|
|
|
|
|
if (current_os == "linux") {
|
|
|
|
if (current_cpu == "x64") {
|
|
|
|
defines += [ "_GLIBCXX_DEBUG=1" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
config("release") {
|
|
|
|
cflags = []
|
|
|
|
defines = [ "NDEBUG" ]
|
|
|
|
|
|
|
|
if (current_os == "linux") {
|
|
|
|
cflags += [ "-Ofast" ]
|
|
|
|
}
|
|
|
|
}
|