[llvm] [gn build] Port commits (PR #201189)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 12:51:56 PDT 2026
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/201189
And fix an issue with sync_source_lists_from_cmake.py breaking Transforms/IPO/BUILD.gn.
5148d2de75ec
6180a4899ff9
bc056ea2c294
ff2fec30ac7c
>From c97a150142daa0c027d91e49330b109a79887f88 Mon Sep 17 00:00:00 2001
From: Arthur Eubanks <aeubanks at google.com>
Date: Tue, 2 Jun 2026 19:49:30 +0000
Subject: [PATCH] [gn build] Port commits
And fix an issue with sync_source_lists_from_cmake.py breaking Transforms/IPO/BUILD.gn.
5148d2de75ec
6180a4899ff9
bc056ea2c294
ff2fec30ac7c
---
llvm/utils/gn/build/sync_source_lists_from_cmake.py | 6 ++++--
.../clang-tools-extra/clang-tidy/bugprone/BUILD.gn | 1 +
llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn | 1 -
.../gn/secondary/clang/unittests/AST/ByteCode/BUILD.gn | 1 +
.../lldb/source/Plugins/DynamicLoader/Windows-DYLD/BUILD.gn | 5 ++++-
.../lldb/source/Plugins/Process/Windows/Common/BUILD.gn | 1 -
6 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/llvm/utils/gn/build/sync_source_lists_from_cmake.py b/llvm/utils/gn/build/sync_source_lists_from_cmake.py
index d772c90c9606e..8a0f0625978aa 100755
--- a/llvm/utils/gn/build/sync_source_lists_from_cmake.py
+++ b/llvm/utils/gn/build/sync_source_lists_from_cmake.py
@@ -62,10 +62,12 @@ def git_out(args):
gn_files = git_out(["ls-files", "*BUILD.gn"]).splitlines()
# Matches e.g. | "foo.cpp",|, captures |foo| in group 1.
- gn_cpp_re = re.compile(r'^\s*"([^$"]+\.(?:cpp|c|h|mm|S))",$', re.MULTILINE)
+ # Exclude absolute paths starting with / (like //llvm/...) to avoid false
+ # positives with write_cmake_config or other non-sources.
+ gn_cpp_re = re.compile(r'^\s*"([^$/"][^$"]*\.(?:cpp|c|h|mm|S))",$', re.MULTILINE)
# Matches e.g. | bar_sources = [ "foo.cpp" ]|, captures |foo| in group 1.
gn_cpp_re2 = re.compile(
- r'^\s*(?:.*_)?sources \+?= \[ "([^$"]+\.(?:cpp|c|h|mm|S))" ]$', re.MULTILINE
+ r'^\s*(?:.*_)?sources \+?= \[ "([^$/"][^$"]*\.(?:cpp|c|h|mm|S))" ]$', re.MULTILINE
)
# Matches e.g. | foo.cpp|, captures |foo| in group 1.
cmake_cpp_re = re.compile(r"^\s*([A-Za-z_0-9./-]+\.(?:cpp|c|h|mm|S))$", re.MULTILINE)
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
index a1c602a158139..1db7d4469f745 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
@@ -61,6 +61,7 @@ static_library("bugprone") {
"MisplacedOperatorInStrlenInAllocCheck.cpp",
"MisplacedPointerArithmeticInAllocCheck.cpp",
"MisplacedWideningCastCheck.cpp",
+ "MissingEndComparisonCheck.cpp",
"MoveForwardingReferenceCheck.cpp",
"MultiLevelImplicitPointerConversionCheck.cpp",
"MultipleNewInOneExpressionCheck.cpp",
diff --git a/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
index d78025ba705d1..181b2a2b4b2c1 100644
--- a/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
@@ -90,7 +90,6 @@ static_library("Basic") {
"ExpressionTraits.cpp",
"FileEntry.cpp",
"FileManager.cpp",
- "FileSystemStatCache.cpp",
"IdentifierTable.cpp",
"LangOptions.cpp",
"LangStandards.cpp",
diff --git a/llvm/utils/gn/secondary/clang/unittests/AST/ByteCode/BUILD.gn b/llvm/utils/gn/secondary/clang/unittests/AST/ByteCode/BUILD.gn
index 04c646b059ece..8ce44abd85729 100644
--- a/llvm/utils/gn/secondary/clang/unittests/AST/ByteCode/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/unittests/AST/ByteCode/BUILD.gn
@@ -12,6 +12,7 @@ unittest("InterpTests") {
sources = [
"BitcastBuffer.cpp",
"Descriptor.cpp",
+ "Pointer.cpp",
"toAPValue.cpp",
]
}
diff --git a/llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/Windows-DYLD/BUILD.gn b/llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/Windows-DYLD/BUILD.gn
index d05d31214ad82..92d9426ce730b 100644
--- a/llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/Windows-DYLD/BUILD.gn
+++ b/llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/Windows-DYLD/BUILD.gn
@@ -10,5 +10,8 @@ static_library("Windows-DYLD") {
# Uses source-relative includes for own headers.
include_dirs = [ "//lldb/source" ]
- sources = [ "DynamicLoaderWindowsDYLD.cpp" ]
+ sources = [
+ "DynamicLoaderWindowsDYLD.cpp",
+ "MSVCRTCFrameRecognizer.cpp",
+ ]
}
diff --git a/llvm/utils/gn/secondary/lldb/source/Plugins/Process/Windows/Common/BUILD.gn b/llvm/utils/gn/secondary/lldb/source/Plugins/Process/Windows/Common/BUILD.gn
index e0ab96f3c5aa3..4184085476743 100644
--- a/llvm/utils/gn/secondary/lldb/source/Plugins/Process/Windows/Common/BUILD.gn
+++ b/llvm/utils/gn/secondary/lldb/source/Plugins/Process/Windows/Common/BUILD.gn
@@ -27,7 +27,6 @@ static_library("Common") {
sources = [
"DebuggerThread.cpp",
"LocalDebugDelegate.cpp",
- "MSVCRTCFrameRecognizer.cpp",
"NativeProcessWindows.cpp",
"NativeRegisterContextWindows.cpp",
"NativeRegisterContextWindows_WoW64.cpp",
More information about the llvm-commits
mailing list