diff options
| author | William Deegan <bill@baddogconsulting.com> | 2015-09-21 17:03:12 (GMT) |
|---|---|---|
| committer | William Deegan <bill@baddogconsulting.com> | 2015-09-21 17:03:12 (GMT) |
| commit | 0941093e0e5a030faa49968457638a3a6aee7ad8 (patch) | |
| tree | 6d33513c14eb6eac0531dd050de0ecca4c39bd79 /test/Libs/bug2903 | |
| download | SCons-2.4.0.zip SCons-2.4.0.tar.gz SCons-2.4.0.tar.bz2 | |
release 2.4.02.4.0
Diffstat (limited to 'test/Libs/bug2903')
| -rw-r--r-- | test/Libs/bug2903/SConstruct | 13 | ||||
| -rw-r--r-- | test/Libs/bug2903/SConstruct-libs | 5 | ||||
| -rw-r--r-- | test/Libs/bug2903/lib.c | 4 | ||||
| -rw-r--r-- | test/Libs/bug2903/main.c | 6 |
4 files changed, 28 insertions, 0 deletions
diff --git a/test/Libs/bug2903/SConstruct b/test/Libs/bug2903/SConstruct new file mode 100644 index 0000000..12919ce --- /dev/null +++ b/test/Libs/bug2903/SConstruct @@ -0,0 +1,13 @@ +# SConstruct for testing but #2903. +# The test changes the lib name to make sure it rebuilds +# when the name changes, even if the content of the lib is the same. +# Also, the test passes in extra shlinkflags to ensure things rebuild +# when other linker options change, and not when they don't. +# (This doesn't specifically test LIBPATH, but there's a test for +# that already.) +env=Environment() +libname=ARGUMENTS.get('libname', 'foo') +env.Append(SHLINKFLAGS=' $EXTRA_SHLINKFLAGS') +shlinkflags=ARGUMENTS.get('shlinkflags', '') +env.SharedLibrary('myshared', ['main.c'], + LIBS=[libname], LIBPATH='.', EXTRA_SHLINKFLAGS=shlinkflags) diff --git a/test/Libs/bug2903/SConstruct-libs b/test/Libs/bug2903/SConstruct-libs new file mode 100644 index 0000000..1590062 --- /dev/null +++ b/test/Libs/bug2903/SConstruct-libs @@ -0,0 +1,5 @@ +env=Environment() +libfoo = env.SharedLibrary('foo', 'lib.c') +env.InstallAs('${SHLIBPREFIX}bar${SHLIBSUFFIX}', libfoo[0]) +if len(libfoo) > 1: # on Windows, there's an import lib (also a .exp, but we don't want that) + env.InstallAs('${LIBPREFIX}bar${LIBSUFFIX}', libfoo[1]) diff --git a/test/Libs/bug2903/lib.c b/test/Libs/bug2903/lib.c new file mode 100644 index 0000000..65f4cd2 --- /dev/null +++ b/test/Libs/bug2903/lib.c @@ -0,0 +1,4 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int i; diff --git a/test/Libs/bug2903/main.c b/test/Libs/bug2903/main.c new file mode 100644 index 0000000..a4b1ecc --- /dev/null +++ b/test/Libs/bug2903/main.c @@ -0,0 +1,6 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +void func() +{ +} |
