[Build] Rename library files if native sources of platform are unchanged #1940
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Build only the SWT binaries whose native sources are really changed and just rename the binaries for all other platforms that are not changed.
Avoiding a rebuild of effectively unchanged binaries has multiple advantages, if only a sub-set of all supported platforms is build:
In order to ensure that native libraries can be renamed without recompilation, we first require:
This PR uses the same strategy as already used in Equinox:
https://github.com/eclipse-equinox/equinox/blob/master/Jenkinsfile
A visible difference in Jenkins is that, if one triggers a build explicitly, there are now three checkboxes to enforce the rebuild of natives for each supported OS (just like in Equinox).