aboutsummaryrefslogtreecommitdiff
path: root/libphobos/src
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-04-12 06:25:04 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-04-12 06:25:04 +0000
commitc50eadba265a0e9b3b84267477f953d0d5872522 (patch)
treeadebd7495b2b5b33202ade4920313cb8e4c79318 /libphobos/src
parent77f4fb57664b93b49257699ddb48182f6dc6a60a (diff)
downloadgcc-c50eadba265a0e9b3b84267477f953d0d5872522.zip
gcc-c50eadba265a0e9b3b84267477f953d0d5872522.tar.gz
gcc-c50eadba265a0e9b3b84267477f953d0d5872522.tar.bz2
d: Add -fbuilding-libphobos-tests option
Currently, the druntime and phobos unittests are compiled as a separate check program, then ran by the libphobos.unittest/unittest.exp script. As PR d/89255 notes, this process lacks proper multilib handling. As a first step, a new internal option that instructs the compiler to put the reference to all unittest functions in another symbol has been added. This will allow each module to be compiled separately as a standalone program using dg-runtest without running into collisions in the D runtime module registry. gcc/d/ChangeLog: 2019-04-12 Iain Buclaw <ibuclaw@gdcproject.org> * d-tree.h (DECL_IN_UNITTEST_CONDITION_P): Define. * decl.cc (DeclVisitor): Add in_version_unittest_ field. (DeclVisitor::visit(ConditionalDeclaration)): New override. (DeclVisitor::visit(FuncDeclaration)): Set DECL_IN_UNITTEST_CONDITION_P. * lang.opt (-fbuilding-libphobos-tests): Add option. * modules.cc (current_testing_module): New static variable. (build_module_tree): Generate second moduleinfo symbol to hold reference to unittests if flag_building_libphobos_tests. (register_module_decl): Check DECL_IN_UNITTEST_CONDITION_P to decide which moduleinfo the decl should be registered against. From-SVN: r270301
Diffstat (limited to 'libphobos/src')
0 files changed, 0 insertions, 0 deletions