From 9a00b8ccfef1d13088be2d76fefcb320c269732a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Jun 2017 13:24:59 +0200 Subject: Add extra support for symbol exporting in modularized projects Since modules don't see each other's macros, we can use a single, keyword- like macro for dll-exporting that is managed by the build system (so no need for an "export" header). For example: cxx.features.symexport = true export __symexport void f (); --- build2/cc/common.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build2/cc/common.hxx') diff --git a/build2/cc/common.hxx b/build2/cc/common.hxx index 24262b7..abeadfc 100644 --- a/build2/cc/common.hxx +++ b/build2/cc/common.hxx @@ -115,7 +115,8 @@ namespace build2 const strings& tstd; // Translated x_std value (options). - bool modules; // x.feaures.modules + bool modules; // x.features.modules + bool symexport; // x.features.symexport const process_path* pkgconfig; // pkgconfig.path (can be NULL). const dir_paths& sys_lib_dirs; // x.sys_lib_dirs @@ -159,6 +160,7 @@ namespace build2 const target_triplet& tg, const strings& std, bool fm, + bool fs, const process_path* pkgc, const dir_paths& sld, const dir_paths& sid, @@ -175,6 +177,7 @@ namespace build2 ctg (tg), tsys (ctg.system), tclass (ctg.class_), tstd (std), modules (fm), + symexport (fs), pkgconfig (pkgc), sys_lib_dirs (sld), sys_inc_dirs (sid), x_src (src), x_mod (mod), x_hdr (hdr), x_inc (inc) {} }; -- cgit v1.1