Age | Commit message (Collapse) | Author | Files | Lines |
|
Currently this is implemented for C/C++ compile and link rules.
|
|
A rule hint is a target attribute, for example:
[rule_hint=cxx] exe{hello}: c{hello}
Rule hints can be used to resolve ambiguity when multiple rules match the same
target as well as to override an unambiguous match.
|
|
|
|
|
|
|
|
The bin.def module is automatically loaded by the c and cxx modules for
the *-win32-msvc target architecture. This allows automatically exporting
all symbols for all Windows targets using the following setup (showing
for cxx in this example):
lib{foo}: libul{foo}: {hxx cxx}{**} ...
lib{foo}: def{foo}: include = ($cxx.target.system == 'win32-msvc')
def{foo}: libul{foo}
if ($cxx.target.system == 'mingw32')
cxx.loptions += -Wl,--export-all-symbols
That is, we use the .def file generation for MSVC and the built-in support
(--export-all-symbols) for MinGW.
But it is also possible to use the .def file generation for MinGW. In this
case we need to explicitly load the bin.def module (which should be done
after loading c or cxx) and using the following setup:
using bin.def # In root.build.
lib{foo}: libul{foo}: {hxx cxx}{**} ...
lib{foo}: def{foo}: include = ($cxx.target.class == 'windows')
def{foo}: libul{foo}
|
|
|