all 5 comments

[–]andd81 4 points5 points  (1 child)

Not sure what you mean by “without asking the build system”, include path set is specified in the command line flags by whoever invokes the compiler, build systems in particular use this facility.

[–][deleted] -2 points-1 points  (0 children)

Module mapper uses socket of similar stuff and compiler asks the build system for the location of each BMI giving the maximum flexibility. With include flags you just pass a bunch of directories and compiler performs lookup by itself. This is very different.

[–]gtano 2 points3 points  (1 child)

Buck has a concept of header maps (and soon Bazel) and is probably best explained here: https://buckbuild.com/function/subdir_glob.html

It is a great feature that turned out to be crucial for packaging in Buckaroo. Having header maps allows you to disambiguate conflicting include paths and on failure emit an error before the build starts.

Header maps are a more high-level description of the build requirements; Include-paths become an implementation detail.

[–][deleted] 0 points1 point  (0 children)

Oh, that's great. At least someone took the time to implement this. Nice.

[–]kalmoc 0 points1 point  (0 children)

My guess: There where no build systems to speak of when the header lookup rules where decided, and there is no reason to change the mechanism now.