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:
Nora Dimitrijević 2022-11-03 11:12:41 +01:00
Родитель 28b7f0884f
Коммит 3d24e0a2eb
3 изменённых файлов: 8 добавлений и 6 удалений

4
.vscode/settings.json поставляемый
Просмотреть файл

@ -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_CXX_COMPILER clang++)
if(APPLE)
set(CMAKE_OSX_ARCHITECTURES x86_64) # temporary until we can build a Universal Binary
endif()
project(codeql)
include(../misc/bazel/cmake/setup.cmake)

Просмотреть файл

@ -5,11 +5,7 @@ def _wrap_cc(rule, kwargs):
_add_args(kwargs, "copts", [
# Required by LLVM/Swift
"-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", [
# temporary, before we do universal merging
"-universal_binaries",