Skip to content

Commit

Permalink
search for includes in share/p4c
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Dodd <[email protected]>
  • Loading branch information
ChrisDodd committed Oct 24, 2024
1 parent 75ea563 commit c943476
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontends/common/parser_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,13 @@ bool ParserOptions::searchForIncludePath(const char *&includePathOut,
}

std::vector<const char *> *ParserOptions::process(int argc, char *const argv[]) {
searchForIncludePath(p4includePath, {"p4include"_cs, "../p4include"_cs, "../../p4include"_cs},
searchForIncludePath(p4includePath,
{"p4include"_cs, "../p4include"_cs, "../../p4include"_cs,
"../share/p4c/p4include"_cs},
exename(argv[0]));
searchForIncludePath(p4_14includePath,
{"p4_14include"_cs, "../p4_14include"_cs, "../../p4_14include"_cs},
{"p4_14include"_cs, "../p4_14include"_cs, "../../p4_14include"_cs,
"../share/p4c/p4_14include"_cs},
exename(argv[0]));

auto remainingOptions = Util::Options::process(argc, argv);
Expand Down

0 comments on commit c943476

Please sign in to comment.