Make sure debug and release builds of .a files are separate #9150
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.
Context: a7b5768
Context: 2ec6f54
a7b5768, among other things, reorganized the way we build our native runtime.
One of the changes was subdivision of source code into separate subdirectories,
each of them a separate static library. One of reasons behind it was preparation
for the future work where we will be linking the application native runtime dynamically
at application build time, mixing and matching various libraries as necessary.
For the last reason, some of the
.a
archives are output to the location where we storefiles to be packaged and distributed to end users. However, what a7b5768 missed was
the fact that this mode operation causes later builds to overwrite the earlier ones, since
archive names are the same. This can cause, for instance, the library debug build to be
silently replaced with the release one. While this won't be a problem on CI (and thus in
our distribution packages), it may have weird effects on one's local workflow (e.g. parts
of the runtime may be built for release and parts for debug, depending on the build order).
2ec6f54 added a partial solution to this issue, but one that covered only the UBSAN and
ASAN scenarios and ignored the debug vs release ones. This commit completes the fix by
making all output libraries use the
-debug
or-release
prefix.Also, libxamarin-native-tracing is not a static library, don't mistakenly treat it as one.