mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Also: * remove new warnings raised by the rust toolchain * run new formatting and linting * update the rust toolchain used by `cargo` While we keep `bazel` builds using the same toolchain as internally (now a nightly one), I opted for using a stable toolchain for `cargo`. The nightly toolchain is only required internally for build reasons, we should keep not using any unstable rust features in our sources.
50 lines
2.0 KiB
Plaintext
50 lines
2.0 KiB
Plaintext
common --enable_platform_specific_config
|
|
# because we use --override_module with `%workspace%`, the lock file is not stable
|
|
common --lockfile_mode=off
|
|
|
|
# Build release binaries by default, can be overwritten to in local.bazelrc and set to `fastbuild` or `dbg`
|
|
build --compilation_mode opt
|
|
|
|
# when building from this repository in isolation, the internal repository will not be found at ..
|
|
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
|
|
# that we can build things that do not rely on that
|
|
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
|
|
|
|
build --repo_env=CC=clang --repo_env=CXX=clang++
|
|
|
|
# print test output, like sembuild does.
|
|
# Set to `errors` if this is too verbose.
|
|
test --test_output all
|
|
# we use transitions that break builds of `...`, so for `test` to work with that we need the following
|
|
test --build_tests_only
|
|
|
|
# this requires developer mode, but is required to have pack installer functioning
|
|
startup --windows_enable_symlinks
|
|
common --enable_runfiles
|
|
|
|
# with the above, we can avoid building python zips which is the default on windows as that's expensive
|
|
build --nobuild_python_zip
|
|
|
|
common --registry=file:///%workspace%/misc/bazel/registry
|
|
common --registry=https://bcr.bazel.build
|
|
|
|
common --@rules_dotnet//dotnet/settings:strict_deps=false
|
|
|
|
# we only configure a nightly toolchain
|
|
common --@rules_rust//rust/toolchain/channel=nightly
|
|
|
|
# rust does not like the gold linker, while bazel does by default, so let's avoid using it
|
|
common:linux --linkopt=-fuse-ld=lld
|
|
common:macos --linkopt=-fuse-ld=lld
|
|
|
|
# Reduce this eventually to empty, once we've fixed all our usages of java, and https://github.com/bazel-contrib/rules_go/issues/4193 is fixed
|
|
common --incompatible_autoload_externally="+@rules_java,+@rules_shell"
|
|
|
|
build --java_language_version=17
|
|
build --tool_java_language_version=17
|
|
build --tool_java_runtime_version=remotejdk_17
|
|
build --java_runtime_version=remotejdk_17
|
|
build --@rules_python//python/config_settings:python_version=3.12
|
|
|
|
try-import %workspace%/local.bazelrc
|