diff options
-rw-r--r-- | src/engine/SCons/Tool/ldc.py | 2 | ||||
-rw-r--r-- | test/D/DMD2.py | 1 | ||||
-rw-r--r-- | test/D/DMD2_Alt.py | 1 | ||||
-rw-r--r-- | test/D/HSTeoh/ArLibIssue/SConstruct_template | 3 | ||||
-rw-r--r-- | test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py | 4 | ||||
-rw-r--r-- | test/D/HSTeoh/LibCompileOptions/SConstruct_template | 3 | ||||
-rw-r--r-- | test/D/HSTeoh/LinkingProblem/SConstruct_template | 2 | ||||
-rw-r--r-- | test/D/Issues/2939_Ariovistus/Project/SConstruct_template | 3 | ||||
-rw-r--r-- | test/D/Issues/2940_Ariovistus/Project/SConstruct_template | 3 | ||||
-rw-r--r-- | test/D/SharedObjects/Common/common.py | 3 | ||||
-rw-r--r-- | test/D/SharedObjects/Image/SConstruct_template | 2 |
11 files changed, 26 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py index 768c885..d519d8d 100644 --- a/src/engine/SCons/Tool/ldc.py +++ b/src/engine/SCons/Tool/ldc.py @@ -101,7 +101,7 @@ def generate(env): env['DLINKCOM'] = '$DLINK -of=$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' env['DSHLINK'] = '$DC' - env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos-ldc') + env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos2-ldc') env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l' diff --git a/test/D/DMD2.py b/test/D/DMD2.py index fc5f79f..84ceb51 100644 --- a/test/D/DMD2.py +++ b/test/D/DMD2.py @@ -42,6 +42,7 @@ if not isExecutableOfToolAvailable(test, 'dmd'): test.write('SConstruct', """\ import os env = Environment(tools=['link', 'dmd']) +env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd if env['PLATFORM'] == 'cygwin': env['OBJSUFFIX'] = '.obj' # trick DMD env.Program('foo', 'foo.d') """) diff --git a/test/D/DMD2_Alt.py b/test/D/DMD2_Alt.py index 11c061d..3bd58b4 100644 --- a/test/D/DMD2_Alt.py +++ b/test/D/DMD2_Alt.py @@ -42,6 +42,7 @@ if not isExecutableOfToolAvailable(test, 'dmd'): test.write('SConstruct', """\ import os env = Environment(tools=['dmd', 'link']) +env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd if env['PLATFORM'] == 'cygwin': env['OBJSUFFIX'] = '.obj' # trick DMD env.Program('foo', 'foo.d') """) diff --git a/test/D/HSTeoh/ArLibIssue/SConstruct_template b/test/D/HSTeoh/ArLibIssue/SConstruct_template index 81f81f5..b17847a 100644 --- a/test/D/HSTeoh/ArLibIssue/SConstruct_template +++ b/test/D/HSTeoh/ArLibIssue/SConstruct_template @@ -1,3 +1,6 @@ env = Environment({}) +import os +env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd + env.StaticLibrary('mylib', ['a.d', 'b.d']) diff --git a/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py b/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py index 26b477b..4716f1c 100644 --- a/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py +++ b/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py @@ -55,6 +55,10 @@ def testForTool(tool): 'ldc': ".*Unknown command line argument '-m64 -O'.*", }[tool] + from SCons.Environment import Base + if tool == 'dmd' and Base()['DC'] == 'gdmd': + result = ".*unrecognized command line option '-m64 -O'.*" + test.fail_test(not test.match_re_dotall(test.stderr(), result)) test.pass_test() diff --git a/test/D/HSTeoh/LibCompileOptions/SConstruct_template b/test/D/HSTeoh/LibCompileOptions/SConstruct_template index 7031f5c..1489624 100644 --- a/test/D/HSTeoh/LibCompileOptions/SConstruct_template +++ b/test/D/HSTeoh/LibCompileOptions/SConstruct_template @@ -1,5 +1,8 @@ env = Environment({}) +import os +env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd + env.Library('mylib', 'mylib.d') prog_env = env.Clone( diff --git a/test/D/HSTeoh/LinkingProblem/SConstruct_template b/test/D/HSTeoh/LinkingProblem/SConstruct_template index a4aa795..2c53b54 100644 --- a/test/D/HSTeoh/LinkingProblem/SConstruct_template +++ b/test/D/HSTeoh/LinkingProblem/SConstruct_template @@ -6,6 +6,8 @@ environment = Environment( tools = ['cc', '{}', 'link'], LIBS = ['ncurses']) +environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd + environment.Object('ncurs_impl.o', 'ncurs_impl.c') environment.Program('prog', Split(""" diff --git a/test/D/Issues/2939_Ariovistus/Project/SConstruct_template b/test/D/Issues/2939_Ariovistus/Project/SConstruct_template index 55f02aa..c78ba96 100644 --- a/test/D/Issues/2939_Ariovistus/Project/SConstruct_template +++ b/test/D/Issues/2939_Ariovistus/Project/SConstruct_template @@ -2,6 +2,9 @@ from os.path import join environment = Environment({}) +import os +environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd + Export('environment') environment.SConscript([ diff --git a/test/D/Issues/2940_Ariovistus/Project/SConstruct_template b/test/D/Issues/2940_Ariovistus/Project/SConstruct_template index 55f02aa..c78ba96 100644 --- a/test/D/Issues/2940_Ariovistus/Project/SConstruct_template +++ b/test/D/Issues/2940_Ariovistus/Project/SConstruct_template @@ -2,6 +2,9 @@ from os.path import join environment = Environment({}) +import os +environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd + Export('environment') environment.SConscript([ diff --git a/test/D/SharedObjects/Common/common.py b/test/D/SharedObjects/Common/common.py index cb1e71b..83b5162 100644 --- a/test/D/SharedObjects/Common/common.py +++ b/test/D/SharedObjects/Common/common.py @@ -49,6 +49,9 @@ def testForTool(tool): if tool == 'gdc': test.skip_test('gdc does not, as at version 4.9.1, support shared libraries.\n') + if tool == 'dmd' and Base()['DC'] == 'gdmd': + test.skip_test('gdmd does not recognize the -shared option so cannot support linking of shared objects.\n') + platform = Base()['PLATFORM'] if platform == 'posix': diff --git a/test/D/SharedObjects/Image/SConstruct_template b/test/D/SharedObjects/Image/SConstruct_template index 213de7e..cae8713 100644 --- a/test/D/SharedObjects/Image/SConstruct_template +++ b/test/D/SharedObjects/Image/SConstruct_template @@ -5,4 +5,6 @@ import os environment = Environment( tools=['{}', 'link']) +environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd + environment.SharedLibrary('answer', 'code.d') |