diff --git a/llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn b/llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn index eb04b3071fad..a41a34cb9ef9 100644 --- a/llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn +++ b/llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn @@ -84,6 +84,7 @@ target(libclang_target_type, "libclang") { "CXTranslationUnit.h", "CXType.cpp", "CXType.h", + "FatalErrorHandler.cpp", "Index_Internal.h", "Indexing.cpp", ] diff --git a/llvm/utils/gn/secondary/clang/unittests/BUILD.gn b/llvm/utils/gn/secondary/clang/unittests/BUILD.gn index befe73b8d9d9..d1382919b5e2 100644 --- a/llvm/utils/gn/secondary/clang/unittests/BUILD.gn +++ b/llvm/utils/gn/secondary/clang/unittests/BUILD.gn @@ -31,7 +31,10 @@ group("unittests") { # to failures, mostly in libclang.VirtualFileOverlay_*. # FIXME: Also, the executable can't find libclang.dll since that's # in a different directory. - deps += [ "libclang:libclangTests" ] + deps += [ + "libclang:libclangTests", + "libclang/CrashTests:libclangCrashTests", + ] } testonly = true } diff --git a/llvm/utils/gn/secondary/clang/unittests/libclang/CrashTests/BUILD.gn b/llvm/utils/gn/secondary/clang/unittests/libclang/CrashTests/BUILD.gn new file mode 100644 index 000000000000..05ce1ecda4c6 --- /dev/null +++ b/llvm/utils/gn/secondary/clang/unittests/libclang/CrashTests/BUILD.gn @@ -0,0 +1,14 @@ +import("//llvm/utils/unittest/unittest.gni") + +unittest("libclangCrashTests") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/tools/libclang", + ] + sources = [ + "LibclangCrashTest.cpp", + ] + if (host_os == "mac") { + ldflags = [ "-Wl,-rpath," + rebase_path("$root_out_dir/lib") ] + } +}