Skip to content

Commit 2b0d6a5

Browse files
committed
Honour CPATH and C_INCLUDE_PATH
1 parent c549ee0 commit 2b0d6a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Driver/Tools.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -4809,6 +4809,10 @@ void FlangFrontend::ConstructJob(Compilation &C, const JobAction &JA,
48094809
UpperCmdArgs.push_back(Arg->getValue(0));
48104810
}
48114811

4812+
// Add env variables
4813+
addDirectoryList(Args, UpperCmdArgs, "-idir", "C_INCLUDE_PATH");
4814+
addDirectoryList(Args, UpperCmdArgs, "-idir", "CPATH");
4815+
48124816
// Add user-defined module directories
48134817
for (auto Arg : Args.filtered(options::OPT_ModuleDir, options::OPT_J)) {
48144818
Arg->claim();

0 commit comments

Comments
 (0)