From c852475f7ab3d15312b768c134d43668a24ecee1 Mon Sep 17 00:00:00 2001 From: pcc Date: Tue, 4 Jun 2024 11:29:03 -0700 Subject: [PATCH] gn build: Pass -fno-sanitize=vptr,function with use_ubsan Matches CMake LLVM_UBSAN_FLAGS. Reviewers: aeubanks Reviewed By: aeubanks Pull Request: https://github.com/llvm/llvm-project/pull/93911 --- llvm/utils/gn/build/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn index b44f8b5d86f1c9..68c0cbfd384a65 100644 --- a/llvm/utils/gn/build/BUILD.gn +++ b/llvm/utils/gn/build/BUILD.gn @@ -375,6 +375,7 @@ config("compiler_defaults") { "ubsan only supported on iOS/Clang, Linux/Clang, or macOS/Clang") cflags += [ "-fsanitize=undefined", + "-fno-sanitize=vptr,function", "-fno-sanitize-recover=all", ] ldflags += [ "-fsanitize=undefined" ]