llvm-project/clang
Sunho Kim a8f2e24e48 [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.
We have seen random symbol not found "__cxa_throw" error in fuschia build bots and out-of-tree users. The understanding have been that they are built without exception support, but it turned out that these platforms have LLVM_STATIC_LINK_CXX_STDLIB ON so that they link libstdc++ to llvm statically. The reason why this is problematic for clang-repl is that by default clang-repl tries to find symbols from symbol table of executable and dynamic libraries loaded by current process. It needs to load another libstdc++, but the platform that had LLVM_STATIC_LINK_CXX_STDLIB turned on is usally those with missing or obsolate shared libstdc++ in the first place -- trying to load it again would be destined to fail eventually with a risk to introuduce mixed libstdc++ versions.

A proper solution that doesn't take a workaround is statically link the same libstdc++ by clang-repl side, but this is not possible with old JIT linker runtimedyld. New just-in-time linker JITLink handles this relatively well, but it's not availalbe in majority of platforms. For now, this patch just disables the building of clang-repl when LLVM_STATIC_LINK_CXX_STDLIB is ON and removes the "__cxa_throw" check in exception unittest as well as reverting previous exception check flag patch.

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D130788
2022-07-31 05:42:57 +09:00
..
bindings [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
cmake [CMake][Fuchsia] Enable assertions and backtraces in stage 1 build 2022-07-26 06:09:38 +00:00
docs [Clang] Fix handling of Max from getValueRange(...) in IntExprEvaluator::VisitCastExpr(...) 2022-07-29 19:17:42 -07:00
examples
include Use is_contained (NFC) 2022-07-30 10:35:54 -07:00
lib Use is_contained (NFC) 2022-07-30 10:35:54 -07:00
runtime Fix running orc-rt tests with LLVM_BUILD_EXTERNAL_COMPILER_RT (again). 2022-07-05 15:20:08 -07:00
test [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
tools [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
unittests [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
utils [Docs] Fix column ordering on clang attribute docs 2022-07-27 21:36:43 -05:00
www [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values 2022-07-28 15:27:50 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang forums:
  https://discourse.llvm.org/c/clang/

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/