Ruby: build extractor using cross

This commit is contained in:
Arthur Baars
2023-01-11 17:17:20 +01:00
parent dc6f5f60d1
commit 5865b51a94
2 changed files with 11 additions and 6 deletions

View File

@@ -1,8 +1,11 @@
#!/bin/bash
set -eux
CARGO=cargo
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
platform="linux64"
if which cross; then
CARGO=cross
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
platform="osx64"
else
@@ -10,9 +13,9 @@ else
exit 1
fi
cargo build --release
"$CARGO" build --release
cargo run --release -p ruby-generator -- --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
"$CARGO" run --release -p ruby-generator -- --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
codeql query format -i ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
rm -rf extractor-pack