aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility-installed.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-06-30 13:01:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-06-30 13:01:16 +0200
commit0a52676ff3de5b302eb4fa85ed8440ae14281318 (patch)
tree897f2d8435eb3140ee5e56fe817cb63cdff7fdcd /libbuild2/utility-installed.cxx
parent195de65a84864cf5931325eeb2356f7d98155055 (diff)
Move symbol exporting .def file rule to bin.def module, add support for MinGW
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}
Diffstat (limited to 'libbuild2/utility-installed.cxx')
0 files changed, 0 insertions, 0 deletions