mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: enable VSCode to build extractor via CMake
The `-arch=x86_64` from `swift/rules.bzl` turns out to be unnecessary, even on Arm-based Macs.
This commit is contained in:
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -1,3 +1,5 @@
|
|||||||
{
|
{
|
||||||
"omnisharp.autoStart": false
|
"omnisharp.autoStart": false,
|
||||||
|
"cmake.sourceDirectory": "${workspaceFolder}/swift",
|
||||||
|
"cmake.buildDirectory": "${workspaceFolder}/bazel-cmake-build"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
|||||||
set(CMAKE_C_COMPILER clang)
|
set(CMAKE_C_COMPILER clang)
|
||||||
set(CMAKE_CXX_COMPILER clang++)
|
set(CMAKE_CXX_COMPILER clang++)
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
set(CMAKE_OSX_ARCHITECTURES x86_64) # temporary until we can build a Universal Binary
|
||||||
|
endif()
|
||||||
|
|
||||||
project(codeql)
|
project(codeql)
|
||||||
|
|
||||||
include(../misc/bazel/cmake/setup.cmake)
|
include(../misc/bazel/cmake/setup.cmake)
|
||||||
|
|||||||
@@ -5,11 +5,7 @@ def _wrap_cc(rule, kwargs):
|
|||||||
_add_args(kwargs, "copts", [
|
_add_args(kwargs, "copts", [
|
||||||
# Required by LLVM/Swift
|
# Required by LLVM/Swift
|
||||||
"-fno-rtti",
|
"-fno-rtti",
|
||||||
] + select({
|
])
|
||||||
# temporary, before we do universal merging and have an arm prebuilt package, we make arm build x86
|
|
||||||
"@platforms//os:macos": ["-arch=x86_64"],
|
|
||||||
"//conditions:default": [],
|
|
||||||
}))
|
|
||||||
_add_args(kwargs, "features", [
|
_add_args(kwargs, "features", [
|
||||||
# temporary, before we do universal merging
|
# temporary, before we do universal merging
|
||||||
"-universal_binaries",
|
"-universal_binaries",
|
||||||
|
|||||||
Reference in New Issue
Block a user