[llvm] gn build: Pass -fno-sanitize=vptr, function with use_ubsan (PR #93911)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 18:45:53 PDT 2024


https://github.com/pcc created https://github.com/llvm/llvm-project/pull/93911

Matches CMake LLVM_UBSAN_FLAGS.


>From 3c052b65ee2fc17dc4ace5283276e8f00f3378f7 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne <peter at pcc.me.uk>
Date: Thu, 30 May 2024 18:45:40 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.6-beta.1
---
 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 16af242979581..2d57196173b68 100644
--- a/llvm/utils/gn/build/BUILD.gn
+++ b/llvm/utils/gn/build/BUILD.gn
@@ -383,6 +383,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" ]



More information about the llvm-commits mailing list