Skip to content

Commit 853e558

Browse files
committed
Set HasPizfix when filc flags are present
When --filc-crt-path or --filc-resource-dir is passed, enable Fil-C mode even if pizfix directory doesn't exist. This allows Nix wrappers to fully control paths via flags without directory discovery.
1 parent 332564f commit 853e558

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,10 +1495,13 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
14951495

14961496
// Check for Fil-C resource directory override
14971497
if (Arg *A = Args.getLastArg(options::OPT_filc_resource_dir)) {
1498+
A->claim();
14981499
PizfixRoot = A->getValue();
1499-
HasPizfix = llvm::sys::fs::is_directory(PizfixRoot);
1500-
if (!HasPizfix)
1501-
Diag(diag::err_drv_no_such_file) << PizfixRoot;
1500+
HasPizfix = true; // Trust the user-provided path
1501+
} else if (Arg *A = Args.getLastArg(options::OPT_filc_crt_path)) {
1502+
// If any filc flag is set, we're in filc mode
1503+
A->claim();
1504+
HasPizfix = true;
15021505
}
15031506

15041507
// Check for missing include directories.

0 commit comments

Comments
 (0)