mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Add missing LDMD option handling code.
Reusing the existing parsing code for DMD compatibility was a good idea, copy-pasting the tool together in the middle of the night not so much.
This commit is contained in:
@@ -732,6 +732,7 @@ void buildCommandLine(std::vector<const char*>& r, const Params& p)
|
||||
if (p.allowDeprecated) r.push_back("-d");
|
||||
if (p.compileOnly) r.push_back("-c");
|
||||
if (p.coverage) warning("Coverage report generation not yet supported by LDC.");
|
||||
if (p.emitSharedLib) r.push_back("-shared");
|
||||
if (p.pic) r.push_back("-relocation-model=pic");
|
||||
if (p.emitMap) warning("Map file generation not yet supported by LDC.");
|
||||
if (!p.multiObj) r.push_back("--singleobj");
|
||||
@@ -764,6 +765,7 @@ void buildCommandLine(std::vector<const char*>& r, const Params& p)
|
||||
if (p.emitStaticLib) r.push_back("-lib");
|
||||
if (p.noFloat) warning("-nofloat is ignored by LDC.");
|
||||
if (p.quiet) r.push_back("-quiet"); // Undocumented.
|
||||
if (p.release) r.push_back("-release"); // Also disables boundscheck.
|
||||
if (p.noBoundsChecks) r.push_back("-disable-boundscheck");
|
||||
if (p.emitUnitTests) r.push_back("-unittest");
|
||||
pushSwitches("-I=", p.modulePaths, r);
|
||||
|
||||
@@ -18,10 +18,13 @@ get_property(ldmd_path TARGET ldmd2 PROPERTY LOCATION)
|
||||
|
||||
add_test(NAME dmd-testsuite-debug
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests/d2/dmd-testsuite
|
||||
COMMAND make RESULTS_DIR=${CMAKE_BINARY_DIR}/dmd-testsuite-debug DMD=${ldmd_path} DFLAGS="-gc" MODEL=${DMD_TEST_MODEL} quick
|
||||
COMMAND make RESULTS_DIR=${CMAKE_BINARY_DIR}/dmd-testsuite-debug DMD=${ldmd_path} DFLAGS=-gc MODEL=${DMD_TEST_MODEL} quick
|
||||
)
|
||||
|
||||
# Would like to specify the "-release" flag here, but some of the tests (e.g.
|
||||
# 'testdstress') depend on contracts and invariants being active. Need a solution
|
||||
# integrated with d_do_test.
|
||||
add_test(NAME dmd-testsuite-release
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests/d2/dmd-testsuite
|
||||
COMMAND make RESULTS_DIR=${CMAKE_BINARY_DIR}/dmd-testsuite-release DMD=${ldmd_path} DFLAGS=-O3\ -release MODEL=${DMD_TEST_MODEL} quick
|
||||
COMMAND make RESULTS_DIR=${CMAKE_BINARY_DIR}/dmd-testsuite-release DMD=${ldmd_path} DFLAGS=-O3 MODEL=${DMD_TEST_MODEL} quick
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user