[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-10 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > To be clear, this PR is basically cherry-picking > https://github.com/swiftlang/llvm-project/pull/9076 AFAICT that patch special-cased for framework directories while this one disables much more. Is that not the case? https://github.com/llvm/llvm-project/pull/134698

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-10 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Talked a bit offline, but the patch LGTM, assuming it is purely restoring the previous behavior before https://github.com/llvm/llvm-project/commit/55323ca6c8b9d21d85591f3499b299b62463321f, which would result in performance parity with the release compiler. > I suggest we

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-09 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/134475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-09 Thread Cyndy Ishida via cfe-commits
@@ -5834,13 +5847,27 @@ bool ASTReader::readASTFileControlBlock( break; case INPUT_FILE: bool Overridden = static_cast(Record[3]); - const size_t FilenameAsRequestedLength = Record[7] + 1; - auto ResolvedFilenameAsRequested = Resolv

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/132237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From 3aaaf3371215de0f214836da32f862518f223760 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/3] [clang][DependencyScanning] Track dependencies from preb

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-08 Thread Cyndy Ishida via cfe-commits
@@ -237,6 +237,17 @@ class ASTReaderListener { return true; } + /// Overloaded member function of \c visitInputFile that should + /// be defined when the input file contains both the virtual and external + /// paths, for example when deserializing input files from AST

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From 3aaaf3371215de0f214836da32f862518f223760 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/2] [clang][DependencyScanning] Track dependencies from preb

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-07 Thread Cyndy Ishida via cfe-commits
@@ -6067,14 +6062,21 @@ llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F, if (OptionalFileEntryRef CurFile = CurrentModule->getASTFile()) { // Don't emit module relocation error if we have -fno-validate-pch if (!bool(PP.getPreprocessorOpts().D

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM, a minor non-blocking question. Thank you! https://github.com/llvm/llvm-project/pull/134475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-07 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > This PR temporarily turns off negative directory caching to fix the build > failures. What does temporarily mean here? Is it until the project identified with errors can resolve themselves? Is it until error detection in the build system can catch cases where negative sta

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-05 Thread Cyndy Ishida via cfe-commits
@@ -5834,9 +5834,13 @@ bool ASTReader::readASTFileControlBlock( break; case INPUT_FILE: bool Overridden = static_cast(Record[3]); + size_t FilenameLen = ModuleDir.size() + Record[7] + 1; auto Filename = ResolveImportedPath(PathBuf

[clang] [clang][modules] Determine if the SDK supports builtin modules independent of the target (PR #134005)

2025-04-03 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM. I was a bit worried about the fallout that other target triples using the same sdks would now opt into this behavior but if that were the case they'd already be running into modularization errors (e.g. `found_incompatible_headers

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/132237 When a module is being scanned, it can depend on modules that have already been built from a pch dependency. When this happens, the pcm files are reused for the module dependencies. When this is the case, c

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-26 Thread Cyndy Ishida via cfe-commits
@@ -5834,9 +5834,13 @@ bool ASTReader::readASTFileControlBlock( break; case INPUT_FILE: bool Overridden = static_cast(Record[3]); + size_t FilenameLen = ModuleDir.size() + Record[7] + 1; auto Filename = ResolveImportedPath(PathBuf

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-26 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From ccbcd77e5bd6712531a23bcd79fc9380fdc3d9bf Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/3] [clang][DependencyScanning] Track dependencies from preb

[clang] [clang][DepScan] Allow ModuleDep to be const (PR #132968)

2025-03-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/132968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-25 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: ping https://github.com/llvm/llvm-project/pull/132237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DepScan] Allow ModuleDep to be const (PR #132968)

2025-03-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/132968 This type can be exposed from C APIs, where instantiations of this type are not expected to mutate after creation. To support this, mark the lazy computation of build arguments mutable, as that is not inten

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-20 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From ccbcd77e5bd6712531a23bcd79fc9380fdc3d9bf Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/2] [clang][DependencyScanning] Track dependencies from preb

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-20 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: >From the previous PR: > This implementation adds some overhead for two reasons. > > It deserializes out more content from prebuilt pcm files. > When a module path is fully realized, it traverses down into the leaf > dependency and updates whether they are in the sysroot. >

[clang] [clang][DepScan] Pass references to ModuleDeps instead of ModuleID in lookupModuleOutput callbacks, NFCI (PR #131688)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/131688 This allows clients to reference more read-only attributes, like IsInStableDirectories. >From 99d2648f4c786e56d1fba51751a418e6858d2f7b Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 11:

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +795,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsShareable) { +

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/5] [clang][DependencyScanning] Track modules that resolve f

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
@@ -157,6 +157,32 @@ static void optimizeCWD(CowCompilerInvocation &BuildInvocation, StringRef CWD) { } } +/// Check a subset of invocation options to determine whether the current +/// context can safely be considered as shareable. +static bool areOptionsInSharedDir(CowCom

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/130634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-15 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +748,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsInSysroot) { +

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-15 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/2] [clang][DependencyScanning] Track modules that resolve f

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -843,7 +864,7 @@ void ModuleDepCollectorPP::addModuleDep( !MDC.isPrebuiltModule(Import)) { cyndyishida wrote: In hindsight, I wish I made this a stacked diff against the real repo. I have an implementation that addresses this in https://github.com/c

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > I have a similar concern to @jansvoboda11 that we probably need to check the > invocation paths as well. > The situation this covers is how likely is it that the build system is going > to determine this needs to be rebuilt, and that happens (in most cases) > purely based

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -843,7 +864,7 @@ void ModuleDepCollectorPP::addModuleDep( !MDC.isPrebuiltModule(Import)) { cyndyishida wrote: Added a test for this, modified from the working patch. https://github.com/llvm/llvm-project/pull/130634/files#diff-06c3b647f63ed03628260e6d

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/4] [clang][DependencyScanning] Track modules that resolve f

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +748,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsInSysroot) { +

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +748,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsInSysroot) { +

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-13 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/3] [clang][DependencyScanning] Track modules that resolve f

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-11 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > but I'm concerned that this does not guarantee the resulting command line > only refers to inputs in the sysroot. Imagine that we run this without the > header search and VFS pruning optimizations - the command line will likely > refer to unused project-specific source/bui

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/130634 That patch tracks whether all the file & module dependencies of a module resolve to a sysroot location. This information will later be queried by build systems for determining where to store the accompanyin

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

2025-03-10 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > This approach becomes a problem when trying to run such tests on a cross-compiling build of clang on a darwin platform. When no darwin targets are included in the build, the tests will still run on a darwin host and fail spuriously because of the missing target. This doesn't

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-05 Thread Cyndy Ishida via cfe-commits
@@ -748,17 +751,21 @@ bool DependencyScanningWorker::computeDependencies( InMemoryFS->setCurrentWorkingDirectory(WorkingDirectory); SmallString<128> FakeInputPath; // TODO: We should retry the creation if the path already exists. - llvm::sys::fs::createUniquePath(ModuleN

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-05 Thread Cyndy Ishida via cfe-commits
@@ -1213,11 +1213,17 @@ void GetDependenciesByModuleNameAction::ExecuteAction() { Preprocessor &PP = CI.getPreprocessor(); SourceManager &SM = PP.getSourceManager(); FileID MainFileID = SM.getMainFileID(); - SourceLocation FileStart = SM.getLocForStartOfFile(MainFileID)

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

2025-02-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/128446 ___ 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-25 Thread Cyndy Ishida via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); if (CWD && !IgnoreCWD) HashBuilder.add(*CWD); - else + else { FSOpts.WorkingDir.clear(); +auto &CGOpts = const_cast(CI.getCo

[clang] [Modules] Add `clang/Lex/HLSLRootSignatureTokenKinds.def` to clang's `modulemap` (PR #127839)

2025-02-19 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. thanks! https://github.com/llvm/llvm-project/pull/127839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix missing module dependency introduced by 7347870 (PR #126007)

2025-02-06 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/126007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida 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][ObjectiveC] Fix Parsing the `::` Optional Scope Specifier (PR #119908)

2024-12-20 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-19 Thread Cyndy Ishida via cfe-commits
@@ -2539,6 +2550,18 @@ void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs llvm::sys::path::append(P, "usr", "include"); addExternCSystemInclude(DriverArgs, CC1Args, P.str()); } + + // Add default framework search paths + auto addFramew

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-17 Thread Cyndy Ishida via cfe-commits
@@ -150,3 +150,23 @@ clang::parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, StringRef SDKRootPath) { return llvm::make_error("invalid SDKSettings.json", llvm::inconvertibleErrorCode()); } + +// For certain platforms/environments al

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-17 Thread Cyndy Ishida via cfe-commits
@@ -,8 +,15 @@ bool Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec( } } - if (SS.isEmpty()) + if (SS.isEmpty()) { +if (getLangOpts().ObjC && !getLangOpts().CPlusPlus && cyndyishida wrote: I'm wondering if it's valid for C code to enter

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

2024-12-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited 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][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Cyndy Ishida via cfe-commits
@@ -2539,6 +2550,18 @@ void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs llvm::sys::path::append(P, "usr", "include"); addExternCSystemInclude(DriverArgs, CC1Args, P.str()); } + + // Add default framework search paths + auto addFramew

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

2024-12-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited 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][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,26 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

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

2024-12-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida commented: Thank you for cleaning this up!! 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][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-11 Thread Cyndy Ishida via cfe-commits
@@ -339,13 +340,11 @@ void InitHeaderSearch::AddDefaultIncludePaths( if (triple.isOSDarwin()) { cyndyishida wrote: I looked into this a bit more. IMO the only way to move all this code to the driver is to either 1. changing search path order between Framew

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/119473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Cyndy Ishida via cfe-commits
@@ -2,6 +2,7 @@ set(LLVM_LINK_COMPONENTS OrcShared OrcTargetProcess Support + Core cyndyishida wrote: Why did you need to add link dependencies? https://github.com/llvm/llvm-project/pull/119473 ___ cfe-commi

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

2024-12-09 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > Sorry, which env var are you referring to? I'm suggesting an explicit test case that checks that `DEFAULT_SYSROOT` is set and behaves as expected. It's ignored if sysroot or isysroot is passed, it's used when they're missing. https://github.com/llvm/llvm-project/pull/1

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

2024-12-06 Thread Cyndy Ishida via cfe-commits
cyndyishida 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? SGTM too. I don't se

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

2024-12-04 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > The main concern is it happens when setting `DEFAULT_SYSROOT`. If only > `isysroot` is supported on macOS, does this mean `DEFAULT_SYSROOT` should be > deprecated on Apple platforms? I don't think it's deprecated in the sense we have plans to drop support for it. The p

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-04 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/118543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-03 Thread Cyndy Ishida via cfe-commits
@@ -339,13 +340,11 @@ void InitHeaderSearch::AddDefaultIncludePaths( if (triple.isOSDarwin()) { cyndyishida wrote: Looks like that was previously attempted by @ldionne in https://github.com/llvm/llvm-project/pull/75841 The problem was appending `/Library/F

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-12-03 Thread Cyndy Ishida via cfe-commits
@@ -346,6 +346,7 @@ void InitHeaderSearch::AddDefaultIncludePaths( AddPath("/System/DriverKit/System/Library/Frameworks", System, true); cyndyishida wrote: Followup in: https://github.com/llvm/llvm-project/pull/118543 https://github.com/llvm/llvm-projec

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-03 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/118543 * Use the centralized API to add `SubFrameworks` for driverkit targets. >From 764bf57ac39fddef74d45d16fffc14035bbbff72 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 3 Dec 2024 11:15:37 -0800 Subjec

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

2024-12-02 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > > However, notably, even on Darwin, if you pass _both_ flags, you still get > > the intended behavior of `-isysroot` affecting headers, and `--sysroot` > > affecting libraries. Your change would break that. > > What's the use-case for this? > > Because for most users, you

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-15 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-15 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-15 Thread Cyndy Ishida via cfe-commits
@@ -346,6 +346,7 @@ void InitHeaderSearch::AddDefaultIncludePaths( AddPath("/System/DriverKit/System/Library/Frameworks", System, true); cyndyishida wrote: I'd rather discuss DriverKit support separately, so I will merge this pr now. > Also, why's there

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-13 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: ping https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/115048 >From 9359df8624a75b7c0c361fdfcd9fc9102824dc68 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 5 Nov 2024 10:48:09 -0800 Subject: [PATCH 1/4] [Clang][Darwin] Introduce `SubFrameworks` as a SDK defaul

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/115048 >From 9359df8624a75b7c0c361fdfcd9fc9102824dc68 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 5 Nov 2024 10:48:09 -0800 Subject: [PATCH 1/3] [Clang][Darwin] Introduce `SubFrameworks` as a SDK defaul

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-08 Thread Cyndy Ishida via cfe-commits
@@ -255,16 +255,21 @@ static void stubifyDirectory(const StringRef InputPath, Context &Ctx) { if (EC) reportError(IT->path() + ": " + EC.message()); -// Skip header directories (include/Headers/PrivateHeaders) and module cyndyishida wrote: My s

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-08 Thread Cyndy Ishida via cfe-commits
@@ -347,6 +347,7 @@ void InitHeaderSearch::AddDefaultIncludePaths( } else { AddPath("/System/Library/Frameworks", System, true); AddPath("/Library/Frameworks", System, true); +AddPath("/System/Library/SubFrameworks", System, true);

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-08 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: ping https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-06 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/115048 >From 9359df8624a75b7c0c361fdfcd9fc9102824dc68 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 5 Nov 2024 10:48:09 -0800 Subject: [PATCH 1/2] [Clang][Darwin] Introduce `SubFrameworks` as a SDK defaul

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-05 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: ``` > git checkout -f baecb5c50287efebf2482739bfbe320c8147b7ff error: unable to unlink old 'clang/lib/AST/Decl.cpp': Invalid argument error: unable to unlink old 'clang/lib/Serialization/ASTReaderDecl.cpp': Invalid argument ``` Seems like an unrelated issue is happening on the

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/115048 >From 9359df8624a75b7c0c361fdfcd9fc9102824dc68 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 5 Nov 2024 10:48:09 -0800 Subject: [PATCH 1/2] [Clang][Darwin] Introduce `SubFrameworks` as a SDK defaul

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/115048 >From dd22f1347530d8f866822074ec9b89cb8ee56867 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 5 Nov 2024 10:48:09 -0800 Subject: [PATCH 1/2] [Clang][Darwin] Introduce `SubFrameworks` as a SDK defaul

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-05 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > Do we also need to update `darwin::Linker::ConstructJob(...)`? I thought about it, but clang already doesn't for today's default paths so I decided against it. It seems only pass extra paths to the linker for platform-specific directories like `DriverKit`. Xcode's `ld` pas

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida reopened https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-05 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > `darwin::Linker::ConstructJob` https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/115048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Darwin] Introduce `SubFrameworks` as a SDK default location (PR #115048)

2024-11-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/115048 * Have clang always append & pass `System/Library/SubFrameworks` when determining default sdk search paths. * Teach `clang-installapi` to traverse there for framework input. * Teach `llvm-readtapi` that the

[clang] [clang-tools-extra] [clang][lex] Remove `HeaderFileInfo::Framework` (PR #114460)

2024-10-31 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. I initially touched this code because I needed to be able to map back input headers from a destination location (DSTROOT) to where they were resolved with headermaps (SRCROOT) for `tapi`/`clang-installapi`. But looking at the code it o

[clang] [clang] Remove 'PCH' from more diagnostics that were wrong or misleading NFC (PR #110724)

2024-10-01 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/110724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove 'PCH' from more diagnostics that were wrong or misleading NFC (PR #110724)

2024-10-01 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/110724 None >From b78a9a6649adaa1b0f7252733995ece7d1cebee0 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 30 Sep 2024 17:07:06 -0700 Subject: [PATCH] [clang] Remove 'PCH' from more diagnostics that were wr

[clang] [docs] Document the missing availability platforms and environments (PR #104653)

2024-08-26 Thread Cyndy Ishida via cfe-commits
@@ -1637,31 +1637,42 @@ specifies availability for the current target platform, the availability attributes are ignored. Supported platforms are: ``ios`` +``ios_app_extension`` cyndyishida wrote: I do think it's still useful to define what those platforms' v

[clang] [docs] Document the missing availability platforms and environments (PR #104653)

2024-08-26 Thread Cyndy Ishida via cfe-commits
@@ -1592,6 +1592,12 @@ succeeds but Clang emits a warning specifying that the function is deprecated. Finally, if Clang is instructed to compile code for macOS 10.7, the call fails because ``f()`` is no longer available. +Clang is instructed to compile code for a particular O

[clang] [docs] Document the missing availability platforms and environments (PR #104653)

2024-08-26 Thread Cyndy Ishida via cfe-commits
@@ -1592,6 +1592,12 @@ succeeds but Clang emits a warning specifying that the function is deprecated. Finally, if Clang is instructed to compile code for macOS 10.7, the call fails because ``f()`` is no longer available. +Clang is instructed to compile code for a particular O

[clang] [docs] Document the missing availability platforms and environments (PR #104653)

2024-08-26 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/104653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Built-in modules are not correctly enabled for Mac Catalyst (PR #104872)

2024-08-19 Thread Cyndy Ishida via cfe-commits
@@ -2953,7 +2953,15 @@ static bool sdkSupportsBuiltinModules( case Darwin::MacOS: return SDKVersion >= VersionTuple(15U); cyndyishida wrote: The extra test coverage is more for future-proofing. There is a decent amount of `TargetVariantTriple` logic happ

[clang] [docs] Document the missing Apple availability platforms (PR #104653)

2024-08-19 Thread Cyndy Ishida via cfe-commits
@@ -1637,31 +1637,42 @@ specifies availability for the current target platform, the availability attributes are ignored. Supported platforms are: ``ios`` +``ios_app_extension`` Apple's iOS operating system. The minimum deployment target is specified as part of the ``-ta

[clang] [docs] Document the missing Apple availability platforms (PR #104653)

2024-08-19 Thread Cyndy Ishida via cfe-commits
@@ -1637,31 +1637,42 @@ specifies availability for the current target platform, the availability attributes are ignored. Supported platforms are: ``ios`` +``ios_app_extension`` Apple's iOS operating system. The minimum deployment target is specified as part of the ``-ta

[clang] [docs] Document the missing Apple availability platforms (PR #104653)

2024-08-19 Thread Cyndy Ishida via cfe-commits
@@ -1637,31 +1637,42 @@ specifies availability for the current target platform, the availability attributes are ignored. Supported platforms are: ``ios`` +``ios_app_extension`` cyndyishida wrote: The description only describes the platform. Can you also incl

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/103040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-13 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/103040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-13 Thread Cyndy Ishida via cfe-commits
@@ -16,33 +16,101 @@ #include "clang/AST/Decl.h" #include "clang/Basic/TargetInfo.h" -namespace clang { +namespace { + +struct AvailabilitySet { + llvm::SmallVector Availabilities; cyndyishida wrote: Can you mark this private, its not clear otherwise that on

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-13 Thread Cyndy Ishida via cfe-commits
@@ -16,33 +16,101 @@ #include "clang/AST/Decl.h" #include "clang/Basic/TargetInfo.h" -namespace clang { +namespace { + +struct AvailabilitySet { + llvm::SmallVector Availabilities; + bool UnconditionallyDeprecated = false; + bool UnconditionallyUnavailable = false; -Avail

[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)

2024-08-13 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida commented: > Additionally this computes availability information for all platforms ahead Can you add a test for this? https://github.com/llvm/llvm-project/pull/103040 ___ cfe-commits mailing list cfe-commits@lists.llvm

  1   2   3   4   >