mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: add flags and instructions for building on macOS ARM
This commit is contained in:
3
.bazelrc
3
.bazelrc
@@ -11,7 +11,8 @@ common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub
|
|||||||
build --repo_env=CC=clang --repo_env=CXX=clang++
|
build --repo_env=CC=clang --repo_env=CXX=clang++
|
||||||
|
|
||||||
build:linux --cxxopt=-std=c++20
|
build:linux --cxxopt=-std=c++20
|
||||||
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
|
# we currently cannot built the swift extractor for ARM
|
||||||
|
build:macos --cxxopt=-std=c++20 --copt=-arch --copt=x86_64 --linkopt=-arch --linkopt=x86_64
|
||||||
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
|
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
|
||||||
|
|
||||||
# this requires developer mode, but is required to have pack installer functioning
|
# this requires developer mode, but is required to have pack installer functioning
|
||||||
|
|||||||
@@ -16,7 +16,14 @@ brew install bazelisk
|
|||||||
then from the `ql` directory run
|
then from the `ql` directory run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bazel run //swift:create-extractor-pack # --cpu=darwin_x86_64 # Uncomment on Arm-based Macs
|
bazel run //swift:create-extractor-pack
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are running on macOS and you encounter errors mentioning `XXX is unavailable: introduced in macOS YY.ZZ`,
|
||||||
|
you will need to run this from the root of your `codeql` checkout:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo common --macos_sdk_version=$(sw_vers --productVersion) >> local.bazelrc
|
||||||
```
|
```
|
||||||
|
|
||||||
which will install `swift/extractor-pack`.
|
which will install `swift/extractor-pack`.
|
||||||
|
|||||||
Reference in New Issue
Block a user