Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: impl build args in bazelrc #58

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@
# c++1z was used prior to c++17 being standardized, and is therefore more
# widely accepted by compilers. This may lead to strange behavior or compiler
# errors in earlier compilers.
build --cxxopt="-std=c++1z"
build --cxxopt="-std=c++1z" --sandbox_debug --incompatible_linkopts_to_linklibs

# --config=release
build:release -c opt

# --config=static
build:static --dynamic_mode='off' --features=-supports_dynamic_linker

# --config=release-static
# fully static profile
build:release-static --config=release --config=static
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
3.7.2
8 changes: 1 addition & 7 deletions build_zetasql_parser.sh
aceforeverd marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ set -eE
pushd "$(dirname "$0")"
pushd "$(git rev-parse --show-toplevel)"

if grep -q centos /etc/os-release ; then
# for thoese using rhel devtoolset
export BAZEL_LINKOPTS='-static-libstdc++:-lm'
export BAZEL_LINKLIBS='-l%:libstdc++.a'
fi

if [[ $(arch) = 'aarch64' ]]; then
git checkout .
# need upgrade abseil and bazel to compile on aarch64
Expand All @@ -36,7 +30,7 @@ fi
echo "build with python: $(python -V), python3: $(python3 -V)"

TARGET='//zetasql/parser/...'
BUILD_ARGV=(--features=-supports_dynamic_linker --sandbox_debug)
BUILD_ARGV=(--config=static)

bazel build "$TARGET" "${BUILD_ARGV[@]}"
bazel test "$TARGET" "${BUILD_ARGV[@]}"
Expand Down
Loading