aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/bin/def-rule.cxx
AgeCommit message (Collapse)AuthorFilesLines
2021-10-27Handle "common symbols" in symbol exporting .def generation ruleBoris Kolpackov1-15/+53
2021-10-14Use tidier pc and def names instead of generic gen for .pc and .def generationBoris Kolpackov1-1/+1
2021-06-30Move symbol exporting .def file rule to bin.def module, add support for MinGWBoris Kolpackov1-137/+244
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}
2021-06-21Add support for automatic generation of symbol exporting .def fileBoris Kolpackov1-0/+610