build: [gn] use consistent node configuration between gyp and build

This commit is contained in:
Jeremy Apthorp 2018-06-29 13:43:57 -07:00
parent 4ebe71655b
commit 99ecbfbd3b

View file

@ -1,3 +1,9 @@
if (is_debug) {
node_configuration = "Debug"
} else {
node_configuration = "Release"
}
action("configure_node") {
script = "//third_party/electron_node/configure"
ssl_libname_suffix = ""
@ -39,7 +45,7 @@ action("gyp_node") {
"node_override.gypi",
]
outputs = [
"$target_out_dir/Release/build.ninja",
"$target_out_dir/$node_configuration/build.ninja",
]
args = [
@ -66,23 +72,18 @@ action("build_node") {
":gyp_node",
]
script = "//electron/build/run-ninja.py"
if (is_debug) {
configuration = "Debug"
} else {
configuration = "Release"
}
args = [
"-C", rebase_path(target_out_dir, root_build_dir) + "/$configuration",
"-C", rebase_path(target_out_dir, root_build_dir) + "/$node_configuration",
"node_lib"
]
if (is_mac) {
outputs = [ "$target_out_dir/$configuration/libnode.dylib" ]
outputs = [ "$target_out_dir/$node_configuration/libnode.dylib" ]
}
if (is_linux) {
outputs = [ "$target_out_dir/$configuration/lib/libnode.so" ]
outputs = [ "$target_out_dir/$node_configuration/lib/libnode.so" ]
}
if (is_win) {
outputs = [ "$target_out_dir/$configuration/node.dll.lib", "$target_out_dir/$configuration/node.dll" ]
outputs = [ "$target_out_dir/$node_configuration/node.dll.lib", "$target_out_dir/$node_configuration/node.dll" ]
}
}