[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: It is important that gets mentioned because this doesn't affect LTO builds that triggered by linker. The `-fthinlto-index` is only used by distributed builds like Bazel for distributed thinLTO so it is important to mention what changed. You can totally construct a test c

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Ah, I think it only applies to `clang -fthinlto-index=` invocation, not LTO/PGOOptions. Can you adjust the commit message and also add a test for it? https://github.com/llvm/llvm-project/pull/159671 ___ cfe-commits mailing list

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Is there any way for user to pass in a different VFS to ThinLTO backend? I think this PR just lift the VFS creation one lever higher but I don't see any benefits of doing that? https://github.com/llvm/llvm-project/pull/159671 __

[clang] [clang] Load `-fms-secure-hotpatch-functions-file=` through the VFS (PR #160146)

2025-09-22 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/160146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > Note to reviewers: > > I did not add any tests here since I don't think there are visible behavior > change observable without CAS. I am testing this work using > https://github.com/swiftlang/swift and its llvm fork. Please let me know if > there are things I can test

[clang] [ClangScanDeps] Improve getTranslationUnitDependencies (PR #159472)

2025-09-18 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > So Swift will provide an in-memory VFS and a command-line whose input points > into the VFS? Yes. That is the plan. https://github.com/llvm/llvm-project/pull/159472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [ClangScanDeps] Improve getTranslationUnitDependencies (PR #159472)

2025-09-18 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > What's the use-case for this? Isn't this equivalent to adding an > `-ivfsoverlay` to the compilation command? This is for a better swift dependency scanning. It is not the same as vfsoverlay since the file will be virtual and not existing on disk. https://github.com/

[clang] [clang-tools-extra] [llvm] [llvm][clang] Pass VFS to `llvm::cl` command line handling (PR #159174)

2025-09-16 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/159174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Don't fail `clang::ExecuteCompilerInvocation()` for unrelated errors (PR #158695)

2025-09-15 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Can you add more comment to explain when do we actually call this function when Diagnostics Engine already has error? This will help to evaluate what is a right thing to do. https://github.com/llvm/llvm-project/pull/158695 _

[clang] [clang-tools-extra] [clang] Initialize the file system explicitly (PR #158381)

2025-09-15 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. Other than the build failure, the current change LGTM. https://github.com/llvm/llvm-project/pull/158381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang-tools-extra] [clang] Initialize the file system explicitly (PR #158381)

2025-09-15 Thread Steven Wu via cfe-commits
@@ -650,32 +675,31 @@ class CompilerInstance : public ModuleLoader { /// Note that this routine also replaces the diagnostic client, /// allocating one if one is not provided. /// - /// \param VFS is used for any IO needed when creating DiagnosticsEngine. It - /// doesn

[clang] [clang] Fix clang module build by declaring new textual header (PR #155510)

2025-08-26 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan auto_merge_enabled https://github.com/llvm/llvm-project/pull/155510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix clang module build by declaring new textual header (PR #155510)

2025-08-26 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/155510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix clang module build by declaring new textual header (PR #155510)

2025-08-26 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/155510 Add `clang/Basic/ABIVersions.def` introduced in #151995 to textual header to fix clang module build. >From 9d4b745b2845d913eb1bab4e4e4ed5952efde27c Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Tue, 2

[clang] [clang] Add a CodeGen option to ignore compilation directories (PR #149897)

2025-08-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/149897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add a CodeGen option to ignore compilation directories (PR #149897)

2025-08-04 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Abandoned for other solution. https://github.com/llvm/llvm-project/pull/149897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ScanDeps] Clear compilation directory if needed (PR #150129)

2025-08-01 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/150129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Remove CWD fallback in compilation directory (PR #150130)

2025-07-31 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan updated https://github.com/llvm/llvm-project/pull/150130 >From 075ebf724c7ffd09723fa56fed9bbeca0d21e683 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Tue, 22 Jul 2025 15:27:18 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?=

[clang] [clang][CodeGen] Remove CWD fallback in compilation directory (PR #150130)

2025-07-31 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan updated https://github.com/llvm/llvm-project/pull/150130 >From 075ebf724c7ffd09723fa56fed9bbeca0d21e683 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Tue, 22 Jul 2025 15:27:18 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?=

[clang] [clang][CodeGen] Remove CWD fallback in compilation directory (PR #150130)

2025-07-31 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/150130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Infer compilation directory in driver (PR #150112)

2025-07-31 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/150112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add a CodeGen option to ignore compilation directories (PR #149897)

2025-07-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > & then for now, in your use case, you'd be using the cc1 flag via -Xclang, > etc? Our explicit module build comes from dependency scanner, where it can generate the cc1 arguments we want to achieve empty compilation directory if needed. https://github.com/llvm/llvm-p

[clang] [clang] Add a CodeGen option to ignore compilation directories (PR #149897)

2025-07-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Here is idea to not to add a new option. I am going to remove the fallback in CodeGen but make sure clang-driver does the fallback computation and clang cc1 will always respect that decision from clang-driver. In that case, it is a behavior change for cc1 flag, but not f

[clang] [clang] Add a CodeGen option to ignore compilation directories (PR #149897)

2025-07-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: I am not planning to merge yet until debug info people approves the direction. Like you said, I considered `-fdebug-compilation-dir=` option but it is actually altering the behavior if I want to achieve empty compilation directory. The underlying implementation can be tw

[clang] [clang] Add a CodeGen option to ignore compilation directories (PR #149897)

2025-07-21 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan updated https://github.com/llvm/llvm-project/pull/149897 >From 4d04ba492459fa8979148390183f4ffe825d3b5d Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Mon, 21 Jul 2025 13:34:06 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [clang][Darwin] Simplify deployment version assignment in the Driver (PR #142013)

2025-06-05 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/142013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #141401)

2025-06-05 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/141401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #141401)

2025-06-04 Thread Steven Wu via cfe-commits
@@ -1645,14 +1645,14 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, CmdArgs.push_back("-lSystem"); // Select the dynamic runtime library and the target specific static library. - if (isTargetIOSBased()) { -// If we are compiling as iOS / simulator,

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #141401)

2025-06-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Function wise, LGTM. https://github.com/llvm/llvm-project/pull/141401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #141401)

2025-06-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/141401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Simplify deployment version assignment in the Driver (PR #142013)

2025-06-03 Thread Steven Wu via cfe-commits
@@ -1938,11 +1942,22 @@ struct DarwinPlatform { SourceKind Kind; DarwinPlatformKind Platform; DarwinEnvironmentKind Environment = DarwinEnvironmentKind::NativeEnvironment; - VersionTuple NativeTargetVersion; - std::string OSVersion; - bool HasOSVersion = true, InferSim

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-06-03 Thread Steven Wu via cfe-commits
@@ -352,6 +352,10 @@ Improvements to Clang's diagnostics - Now correctly diagnose a tentative definition of an array with static storage duration in pedantic mode in C. (#GH50661) +- Split diagnosis of implicit integer comparison on negation to a new + diagnostic group ``-W

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Steven Wu via cfe-commits
@@ -2313,12 +2340,12 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { SDKInfo = parseSDKSettings(getVFS(), Args, getDriver()); // The OS and the version can be specified using the -target argument. - std::optional OSTarget = + std::optional DP = ---

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/142013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Generally looks fine. https://github.com/llvm/llvm-project/pull/142013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][unittests] Fix a leak in SearchPathTest (PR #139335)

2025-05-09 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/139335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-08 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. Thanks. LGTM. https://github.com/llvm/llvm-project/pull/138610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-06 Thread Steven Wu via cfe-commits
@@ -709,7 +711,7 @@ static AvailabilityResult CheckAvailability(ASTContext &Context, << EnvName << HintMessage; cachemeifyoucan wrote: Do you want to avoid the extra space here? https://github.com/llvm/llvm-project/pull/138610 _

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-17 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM. Thanks for looking into the question I have. I slightly prefer if it is an option, making your platform either be darwin, or be entirely not darwin. But since you only need test update, I am ok with it since it doesn't make th

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-11 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Do you have a bot or build to point to for test failures? There is no way to disable Darwin target from clang driver. I think the test might be related to the host platform is not Darwin so the driver didn't infer the target correctly without a default target triple? I

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-11 Thread Steven Wu via cfe-commits
@@ -18,7 +18,7 @@ // RUN: c-index-test -test-load-source local %s -include %t.clang.h -fmodules -fmodules-cache-path=%t.mcp -Xclang -triple -Xclang x86_64-apple-darwin | FileCheck %s // FIXME: Still fails on at least some linux boxen. -// REQUIRES: system-darwin +// REQUIRES

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-11 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: I think the fix makes sense for a linux toolchain running on Darwin. I am still surprised that you have a "system-darwin" platform where you don't want the default target triple to be darwin. I am ok with the fix but it will be good to update the R

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-11 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/130138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: @adrian-prantl for the debug directory option since that might interact how debugger working with the option. I think we need a solution approved by debugger forks for how to avoid stamping CWD into debug info and when it is safe to do so (for example, we guarantee all

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-20 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > This is clearer as we are currently only going to distribute the ThinLTO part > and have no plans to distribute the FullLTO part. Making the name more > general could confuse users who might then expect in e.g., a mixed Thin+Full > link that the Full bitcode part would

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-18 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Some high level comments: * Should we just call it distributedLTO, or DLTO? Feel like we can drop the thin part for less typing, and from the user's point of view, using thinLTO infrastructure is just implementation details. * Are you going to imple

[clang] [DependencyScanning] Add ability to scan TU with a buffer input (PR #125111)

2025-02-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/125111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Steven Wu via cfe-commits
@@ -63,7 +63,10 @@ enum class ScanningOptimizations { /// Canonicalize -D and -U options. Macros = 8, - DSS_LAST_BITMASK_ENUM(Macros), + /// Ignore the compiler's working directory if it is safe. + IgnoreCWD = 0x10, cachemeifyoucan wrote: Nit: maybe up

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM with some small style comments. https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Steven Wu via cfe-commits
@@ -397,9 +397,91 @@ void ModuleDepCollector::applyDiscoveredDependencies(CompilerInvocation &CI) { } } +static bool isSafeToIgnoreCWD(const CowCompilerInvocation &CI) { + // Check if the command line input uses relative paths. + // It is not safe to ignore the current wo

[clang] [DependencyScanning] Add ability to scan TU with a buffer input (PR #125111)

2025-02-03 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Ping. https://github.com/llvm/llvm-project/pull/125111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DependencyScanning] Add ability to scan TU with a buffer input (PR #125111)

2025-01-30 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan updated https://github.com/llvm/llvm-project/pull/125111 >From d836f2f5da850f0d985f34253873c6c461606db0 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Thu, 30 Jan 2025 11:51:41 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [DependencyScanning] Add ability to scan TU with a buffer input (PR #125111)

2025-01-30 Thread Steven Wu via cfe-commits
@@ -0,0 +1,111 @@ +// UNSUPPORTED: target=powerpc64-ibm-aix{{.*}} + +// RUN: rm -rf %t +// RUN: split-file %s %t + +//--- module.modulemap +module root { header "root.h" } +module direct { header "direct.h" } +module transitive { header "transitive.h" } +module addition { header "

[clang] [DependencyScanning] Add ability to scan TU with a buffer input (PR #125111)

2025-01-30 Thread Steven Wu via cfe-commits
@@ -0,0 +1,111 @@ +// UNSUPPORTED: target=powerpc64-ibm-aix{{.*}} + +// RUN: rm -rf %t +// RUN: split-file %s %t + +//--- module.modulemap +module root { header "root.h" } +module direct { header "direct.h" } +module transitive { header "transitive.h" } +module addition { header "

[clang] [DependencyScanning] Add ability to scan TU with a buffer input (PR #125111)

2025-01-30 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/125111 Update Dependency scanner so it can scan the dependency of a TU with a provided buffer rather than relying on the on disk file system to provide the input file. >From d836f2f5da850f0d985f34253873c6c4616

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-01-30 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Is it better if this optimization happens really early in the process since you only visit all the options in CI? In that case, you can just reset the `CurrentWorkingDirectory` in the VFS so all the searching is done without CWD. This avoids any ha

[clang] [clang][modules] Partially revert 48d0eb518 to fix -gmodules output (PR #124003)

2025-01-22 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/124003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve the documentation for the init_priority attribute (PR #123098)

2025-01-17 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/123098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve the documentation for the init_priority attribute (PR #123098)

2025-01-17 Thread Steven Wu via cfe-commits
@@ -121,11 +121,12 @@ def InitPriorityDocs : Documentation { In C++, the order in which global variables are initialized across translation units is unspecified, unlike the ordering within a single translation unit. The ``init_priority`` attribute allows you to specify a relati

[clang] [clang][Driver] Add -fuse-lipo option (PR #121231)

2025-01-16 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Merged. Thanks for your contribution! https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Add -fuse-lipo option (PR #121231)

2025-01-16 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Add -fuse-lipo option (PR #121231)

2025-01-16 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: I updated the title and PR message. Let me know if that looks ok for you. https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang][Driver] Add -fuse-lipo option (PR #121231)

2025-01-16 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add -fuse-lipo option (PR #121231)

2025-01-16 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add -fuse-lipo option (PR #121231)

2025-01-16 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: @khyperia Sure, I can help you merge. Code change looks good as I don't see any open review feedback and no objection from adding the option. Can you please update the PR message to be a better formatted commit message? The squash commit will use that as commit message,

[clang] [clang] Improve the documentation for the init_priority attribute (PR #123098)

2025-01-15 Thread Steven Wu via cfe-commits
@@ -121,11 +121,12 @@ def InitPriorityDocs : Documentation { In C++, the order in which global variables are initialized across translation units is unspecified, unlike the ordering within a single translation unit. The ``init_priority`` attribute allows you to specify a relati

[clang] [clang] Improve the documentation for the init_priority attribute (PR #123098)

2025-01-15 Thread Steven Wu via cfe-commits
@@ -136,12 +137,18 @@ relative ordering of values is important. For example: ``Obj2`` will be initialized *before* ``Obj1`` despite the usual order of initialization being the opposite. +Note that this attribute does not control the initialization order of objects +across fina

[clang] [clang][Serialization] Add the missing block info (PR #122976)

2025-01-15 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan closed https://github.com/llvm/llvm-project/pull/122976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-10 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. This looks much better. Thanks! https://github.com/llvm/llvm-project/pull/15 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang] Rename ReadPCHAndPreprocessAction (NFC) (PR #122390)

2025-01-09 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan updated https://github.com/llvm/llvm-project/pull/122390 >From 1796a6e4fa0492b9676637245a394d3029474d4e Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Thu, 9 Jan 2025 15:46:06 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [clang] Rename ReadPCHAndPreprocessAction (NFC) (PR #122390)

2025-01-09 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/122390 Rename `ReadPCHAndPreprocessAction` class. This frontend action is used for dependency scanning only and the current name is confusing for what it actually does. Rename the class to `DependencyScanningFro

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Steven Wu via cfe-commits
@@ -1346,14 +1344,30 @@ static void runThinLTOBackend( } } -void clang::EmitBackendOutput( -DiagnosticsEngine &Diags, const HeaderSearchOptions &HeaderOpts, -const CodeGenOptions &CGOpts, const clang::TargetOptions &TOpts, -const LangOptions &LOpts, StringRef TDe

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Steven Wu via cfe-commits
@@ -1346,14 +1344,30 @@ static void runThinLTOBackend( } } -void clang::EmitBackendOutput( -DiagnosticsEngine &Diags, const HeaderSearchOptions &HeaderOpts, -const CodeGenOptions &CGOpts, const clang::TargetOptions &TOpts, -const LangOptions &LOpts, StringRef TDe

[clang] Add -fuse-lipo option (PR #121231)

2025-01-02 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add -fuse-lipo option (PR #121231)

2025-01-02 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > I tried to take precedence from -fuse-ld and --ld-path, so -fuse-lipo takes a > name, and a hypothetical future --lipo-path would be a full path. Perhaps > these are only named this way due to legacy compatibility though, and new > naming conventions should be somethin

[clang] Add -fuse-lipo option (PR #121231)

2025-01-02 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add -fuse-lipo option (PR #121231)

2025-01-02 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: LGTM in general with a comment in test. For discussion. Is it better if the option supplies the full path to lipo or just the name? Full path seems to be easy to use, but might deserve a warning if the tool doesn't exist. If just the name, it might

[clang] Add -fuse-lipo option (PR #121231)

2025-01-02 Thread Steven Wu via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang %s -### --target=arm64-apple-darwin -arch x86_64 -arch arm64 -fuse-lipo=llvm-lipo 2>&1 | FileCheck -check-prefix=TEST1 %s cachemeifyoucan wrote: Nit: Add a test case to check when the flag is not supplied. https://github.com/llv

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-18 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/120149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
@@ -43,8 +43,8 @@ // RUN: %clang -target x86_64-apple-macos10.13 -mlinker-version=520 \ // RUN: -### %t.o 2>&1 \ -// RUN: | FileCheck --check-prefix=NOSDK %s +// RUN: | FileCheck --check-prefix=INFERRED-SDK %s cachemeifyoucan wrote: I see. The value of

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM after addressing the last comment. https://github.com/llvm/llvm-project/pull/119670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
@@ -43,8 +43,8 @@ // RUN: %clang -target x86_64-apple-macos10.13 -mlinker-version=520 \ // RUN: -### %t.o 2>&1 \ -// RUN: | FileCheck --check-prefix=NOSDK %s +// RUN: | FileCheck --check-prefix=INFERRED-SDK %s cachemeifyoucan wrote: I think you want to

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > For reference, the failure from dropping `XFAIL` from > `darwin-ld-platform-version-macos.c`: > > Failure Log > ``` > + /Users/carlocab/github/llvm-project/build-xcselect/bin/FileCheck > --check-prefix=NOSDK > /Users/carlocab/github/llvm-project/clang/test/Driver/darw

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/119670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
@@ -2257,17 +2261,25 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { // Warn if the path does not exist. if (!getVFS().exists(A->getValue())) getDriver().Diag(clang::diag::warn_missing_sysroot) << A->getValue(); - } else { -if (char *env =

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > Is there any reason why default builds don't just use the macOS spelling, at > least for modern versions of macOS? I don't think anyone has looked into changing the host guess script. I am ok to switch to macOS spelling. > I'm wondering if it's worth reviving the CLAN

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Let's investigate to see all those test failed (many of them have versioned deployment target). Maybe it is because the `darwin` legacy OS in the triple? Maybe don't use `xcselect` when it is darwin since the modern spelling should `macOS` family?

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/119670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Steven Wu via cfe-commits
@@ -1,3 +1,6 @@ +// XFAIL: xcselect cachemeifyoucan wrote: I don't feel XFAIL is correct to use here in general. It is possible to have a different host SDK and the test will actually pass, right? https://github.com/llvm/llvm-project/pull/119670 ___

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Steven Wu via cfe-commits
@@ -2257,17 +2261,26 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { // Warn if the path does not exist. if (!getVFS().exists(A->getValue())) getDriver().Diag(clang::diag::warn_missing_sysroot) << A->getValue(); - } else { -if (char *env =

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: The idea looks good. Need to add test. You should add `CLANG_USE_XCSELECT` as a requirement and label all the tests properly (including those will break). Maybe you can also remove the hack for `CLANG_NO_XCSELECT` but I am neutral on that. https:

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Steven Wu via cfe-commits
@@ -214,6 +214,39 @@ if(GCC_INSTALL_PREFIX AND NOT USE_DEPRECATED_GCC_INSTALL_PREFIX) "See https://github.com/llvm/llvm-project/pull/77537 for detail.") endif() +if(APPLE) + check_include_file(xcselect.h CLANG_HAVE_XCSELECT_H) cachemeifyoucan wrote: All

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/119670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-10 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/115993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

2024-12-09 Thread Steven Wu via cfe-commits
@@ -226,3 +226,26 @@ // // RUN: HOME=%S/Inputs/config %clang -### --config-user-dir=~ -v 2>&1 | FileCheck %s --check-prefix=CHECK-TILDE // CHECK-TILDE: User configuration file directory: {{.*}}/Inputs/config + +//--- Fallback to stripping OS versions +// +// RUN: touch %t/test

[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

2024-12-06 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/111387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-05 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Current patch breaks test: ``` // We pass --sysroot="" to defeat any -DDEFAULT_SYSROOT parameter. ``` I think that just a pure hack in the test case, we can just update the test. @cyndyishida what do you think about the current approach? https://github.com/llvm/llvm-proje

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-04 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Ah, I see. I think `--sysroot` is not even involved when you use `DEFAULT_SYSROOT`, it is injected here: https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/Driver.cpp#L205 Maybe instead of, the logic in the patch should be setting `-syslibroot` for linker in

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-04 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: > DEFAULT_SYSROOT was expected by some users to support setting a default SDK. > Maybe this wasn't actually intended, but it came common enough knowledge to > eventually be explicitly recommended in parts of LLVM documentation: That is flang document, which is not endors

  1   2   3   >