Skip to content

Commit

Permalink
[GYP] Storage library should only be built when the fallback-to-build…
Browse files Browse the repository at this point in the history
… happens
  • Loading branch information
hydai committed Dec 6, 2020
1 parent 30eca0d commit 485518d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
14 changes: 14 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
{
"targets": [
{
"target_name": "action_before_build",
"type": "none",
"hard_dependency": 1,
"actions": [
{
"action_name": "build rust-native-storage library",
"inputs": [ "scripts/build_storage_lib.sh" ],
"outputs": [ "" ],
"action": ["scripts/build_storage_lib.sh"]
}
]
},
{
"target_name": "<(module_name)",
"dependencies": [ "action_before_build" ],
"cflags_cc": [ "-std=c++17" ],
"cflags!": [ "-fno-exceptions", "-fno-rtti" ],
"cflags_cc!": [ "-fno-exceptions", "-fno-rtti" ],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssvm-extensions",
"version": "0.0.4",
"version": "0.0.5",
"description": "Second State WebAssembly VM for Node.js Addon with all extensions",
"keywords": [
"wasm",
Expand Down Expand Up @@ -33,7 +33,7 @@
"ssvmup": "^0.1.17"
},
"scripts": {
"preinstall": "./preinstall.sh",
"preinstall": "./scripts/preinstall.sh",
"test": "cd ssvm-napi/test && ./test.sh",
"install": "node-pre-gyp install --fallback-to-build"
}
Expand Down
5 changes: 5 additions & 0 deletions scripts/build_storage_lib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Build SSVM-Storage dependencies
cd ./rust_native_storage_library/
make target/debug/librust_native_storage_library.so
cd ../
5 changes: 0 additions & 5 deletions preinstall.sh → scripts/preinstall.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/usr/bin/env bash
# Build SSVM-Storage dependencies
cd ./rust_native_storage_library/
make target/debug/librust_native_storage_library.so
cd ../

# Check TensorFlow version
c++ ./utils/checker/tensorflow_version_checker.cc -ltensorflow -o ./tf_ver
./tf_ver
Expand Down
File renamed without changes.

0 comments on commit 485518d

Please sign in to comment.