Merge pull request #12948 from nornagon/node-config

[gn] Include node/common.gypi when building node
This commit is contained in:
Jeremy Apthorp 2018-05-15 10:42:29 -07:00 committed by GitHub
commit 0fb6dc79d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,10 +7,11 @@ action("gyp_node") {
"node.gypi", "node.gypi",
] ]
outputs = [ outputs = [
"$target_out_dir/Release_Base/build.ninja", "$target_out_dir/Release/build.ninja",
] ]
args = [ args = [
"-I", rebase_path("node.gypi", root_build_dir), "-I", rebase_path("node.gypi", root_build_dir),
"-I", rebase_path("//third_party/electron_node/common.gypi", root_build_dir),
"-D", "component=shared_library", "-D", "component=shared_library",
"-D", "buildtype=Custom", "-D", "buildtype=Custom",
"-D", "target_arch=x64", "-D", "target_arch=x64",
@ -31,17 +32,17 @@ action("build_node") {
] ]
script = "//electron/build/run-ninja.py" script = "//electron/build/run-ninja.py"
args = [ args = [
"-C", rebase_path(target_out_dir, root_build_dir) + "/Release_Base", "-C", rebase_path(target_out_dir, root_build_dir) + "/Release",
"node_lib" "node_lib"
] ]
outputs = [ outputs = [
"$target_out_dir/Release_Base/libnode.dylib" "$target_out_dir/Release/libnode.dylib"
] ]
} }
copy("copy_node") { copy("copy_node") {
deps = [ ":build_node" ] deps = [ ":build_node" ]
sources = [ "$target_out_dir/Release_Base/libnode.dylib" ] sources = [ "$target_out_dir/Release/libnode.dylib" ]
outputs = [ "$root_out_dir/{{source_file_part}}" ] outputs = [ "$root_out_dir/{{source_file_part}}" ]
} }
@ -52,7 +53,7 @@ config("node_config") {
"//third_party/electron_node/deps/cares/include", "//third_party/electron_node/deps/cares/include",
] ]
libs = [ libs = [
"$target_out_dir/Release_Base/libnode.dylib" "$target_out_dir/Release/libnode.dylib"
] ]
cflags_cc = [ cflags_cc = [
"-Wno-deprecated-declarations", "-Wno-deprecated-declarations",