You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We support deployment of artifacts across multiple platforms with multiple compilers (gcc, xlc, msvc). When a compiler/linker option from one of the previous stage is passed during default-test phase, few linkers (like gcc) are smart enough to exclude some linker options that might not be applicable for building a test executable, whereas few other compiler (e.g., xlc & msvc) still continue to link with linker options that either render an invalid unit-test executable (that can't be run) or fail to build an executable.
Example:
For msvc linker, linker options like /DLL or / DEF when continued to be passed as a flag during default-test phase, tries building an intermediate unittest.lib for test executable & fails to render a valid unit-test executable.
For xlc linker, similar linker options used for building a shared object must be discarded during test phase, those linker flags include -bnoentry, -bE, -qmkshrobj.
Solution:
The most elegant solution, we could think of cross-platform is to provide a testExcludeOptions that when passed in the linker section, would just exclude linker options (that were previously included to build a shared object) from getting passed to linker during the test-phase build.
Pull-request:
Please refer to #306, also contains automated tests (unit-tests) to validate the issue.
The text was updated successfully, but these errors were encountered:
I recently had a similar issue with tests taking on options/defines from the main build that where not appropriate.
My workaround for a definition was to #undef in the test file.
The solution seems ok to me so far, however...
The only alternative I can think of is to use the existing configuration as a 'common' and to have additional <mainOptions> and <testOptions> style to split additional config, rather than removing config.
Needs something for 'Options' and also 'Defines' for linker and compilers.
Problem Scenario:
We support deployment of artifacts across multiple platforms with multiple compilers (gcc, xlc, msvc). When a compiler/linker option from one of the previous stage is passed during default-test phase, few linkers (like gcc) are smart enough to exclude some linker options that might not be applicable for building a test executable, whereas few other compiler (e.g., xlc & msvc) still continue to link with linker options that either render an invalid unit-test executable (that can't be run) or fail to build an executable.
Example:
For msvc linker, linker options like /DLL or / DEF when continued to be passed as a flag during default-test phase, tries building an intermediate unittest.lib for test executable & fails to render a valid unit-test executable.
For xlc linker, similar linker options used for building a shared object must be discarded during test phase, those linker flags include -bnoentry, -bE, -qmkshrobj.
Solution:
The most elegant solution, we could think of cross-platform is to provide a testExcludeOptions that when passed in the linker section, would just exclude linker options (that were previously included to build a shared object) from getting passed to linker during the test-phase build.
Pull-request:
Please refer to #306, also contains automated tests (unit-tests) to validate the issue.
The text was updated successfully, but these errors were encountered: