From 4a03976a1509a449ff46958851d4f76099623237 Mon Sep 17 00:00:00 2001 From: Alex Denisov Date: Thu, 28 Apr 2022 13:17:05 +0200 Subject: [PATCH] Swift: set compiler flags explicitly --- .bazelrc | 3 +-- swift/extractor/BUILD.bazel | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index 2c292867234..9a58b60c3ef 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,4 +1,3 @@ -# -fno-rtti is required by LLVM/Swift -build --repo_env=CC=clang --repo_env=CXX=clang++ --copt="-std=c++17" --copt="-fno-rtti" +build --repo_env=CC=clang --repo_env=CXX=clang++ --copt="-std=c++17" try-import %workspace%/local.bazelrc diff --git a/swift/extractor/BUILD.bazel b/swift/extractor/BUILD.bazel index 785bc83f030..34660b035d2 100644 --- a/swift/extractor/BUILD.bazel +++ b/swift/extractor/BUILD.bazel @@ -14,6 +14,10 @@ cc_binary( "SwiftExtractorConfiguration.h", "main.cpp", ], + copts = [ + # Required by LLVM/Swift + "-fno-rtti", + ], target_compatible_with = select({ "@platforms//os:linux": [], "@platforms//os:macos": [],