Skip to content

Commit

Permalink
Don't pass -ibuiltininc, which is used only by the driver, to CC1
Browse files Browse the repository at this point in the history
This fixes a fallout from 5b77e75.

Differential Revision: https://reviews.llvm.org/D154388
  • Loading branch information
ahatanaka committed Jul 5, 2023
1 parent 198df5f commit a2b7297
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,9 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
} else if (A->getOption().matches(options::OPT_stdlibxx_isystem)) {
// Translated to -internal-isystem by the driver, no need to pass to cc1.
continue;
} else if (A->getOption().matches(options::OPT_ibuiltininc)) {
// This is used only by the driver. No need to pass to cc1.
continue;
}

// Not translated, render as usual.
Expand Down
1 change: 1 addition & 0 deletions clang/test/Driver/darwin-header-search-system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
// RUN: -DRESOURCE=%S/Inputs/resource_dir \
// RUN: --check-prefix=CHECK-NOSTDINC-BUILTINC %s
// CHECK-NOSTDINC-BUILTINC: "-cc1"
// CHECK-NOSTDINC-BUILTINC-NOT: "-ibuiltininc"
// CHECK-NOSTDINC-BUILTINC-NOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
// CHECK-NOSTDINC-BUILTINC: "-internal-isystem" "[[RESOURCE]]/include"
// CHECK-NOSTDINC-BUILTINC-NOT: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
Expand Down

0 comments on commit a2b7297

Please sign in to comment.