[all-commits] [llvm/llvm-project] 55bef4: Reland "[clang] Delay normalization of `-fmodules-...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Wed Sep 10 15:56:29 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 55bef46146f05e1911fcb98715716d914efd518c
      https://github.com/llvm/llvm-project/commit/55bef46146f05e1911fcb98715716d914efd518c
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2025-09-10 (Wed, 10 Sep 2025)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/include/clang/Lex/HeaderSearch.h
    M clang/lib/Frontend/CompilerInstance.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Lex/HeaderSearch.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
    A clang/test/Modules/modules-cache-path-canonicalization-output.c

  Log Message:
  -----------
  Reland "[clang] Delay normalization of `-fmodules-cache-path` (#150123)"

This reverts commit 613caa909c78f707e88960723c6a98364656a926, essentially
reapplying 4a4bddec3571d78c8073fa45b57bbabc8796d13d after moving
`normalizeModuleCachePath` from clangFrontend to clangLex.

This PR is part of an effort to remove file system usage from the
command line parsing code. The reason for that is that it's impossible
to do file system access correctly without a configured VFS, and the VFS
can only be configured after the command line is parsed. I don't want to
intertwine command line parsing and VFS configuration, so I decided to
perform the file system access after the command line is parsed and the
VFS is configured - ideally right before the file system entity is used
for the first time.

This patch delays normalization of the module cache path until
`CompilerInstance` is asked for the cache path in the current
compilation context.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list