-
Notifications
You must be signed in to change notification settings - Fork 277
Rename object files so that we don't have collisions between different #7592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename object files so that we don't have collisions between different #7592
Conversation
object files coming from different projects. Fixes diffblue#7586 Co-authored-by: Enrico Steffinlongo "enrico.steffinlongo@diffblue.com" Co-authored-by: Fotis Koutoulakis "fotis.koutoulakis@diffblue.com"
# Unpack the library | ||
${AR_COMMAND} -x ${lib} | ||
|
||
# Rename all object file in the library prepending "${LIBNAME}_" to avoid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit pick: s/file/files/
done | ||
|
||
# Append all the unpacked files to the destination library | ||
${AR_COMMAND} -rcs ${DESTINATION} *.o | ||
${AR_COMMAND} -rcs ${DESTINATION} **/*.o |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why **
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**
supports matching the pattern across the contents of multiple directories, which is needed because of the preceding changes which places the .o
files in separate directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the files are in the subfolder we need to add all .o
in the subfolders.
However this can be problematic, so Fotis is now pushing an updated and more robust version of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would have worked if you used 1) bash
as the shell and 2) had the globstar
option set (for those versions of bash
that even support it). As it was, **
was not meaningful. But then you've now found a different solution.
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## develop #7592 +/- ##
===========================================
+ Coverage 78.48% 78.50% +0.02%
===========================================
Files 1670 1670
Lines 191775 191777 +2
===========================================
+ Hits 150509 150554 +45
+ Misses 41266 41223 -43 see 4 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
This avoids potential issues with clashing translation unit name in case pre-existing translation units exist in the archiving directory.
mkdir add_dependencies_tmp | ||
cd add_dependencies_tmp | ||
|
||
# The full path of the current "root" directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ I found this comment confusing on first reading. Surely pwd
Prints the Working Directory not the root directory which would be /
? On second reading I guess this means the root of the working tree, rather than the root of the filing system, but the overloaded terminology makes this confusing.
# Rename all object file in the library prepending "${LIBNAME}_" to avoid | ||
# clashes. | ||
# Rename all object files in the library prepending "${LIBNAME}_" to avoid | ||
# clashes, and move to the "root" folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Mixed terminology. You used "folder" here and "directory" previously. It would be nice to choose one term and use it consistently...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the comments by @thomasspriggs and also would prefer not to have a TODO
remaining. That said, they're not blockers to this progressing for me.
@TGWDB The We can't do it now (it requires multiple rounds of CI after this PR has been merged) and it's something that we really need to keep track of going forward, as we've already blown the caches way above the limit we're allowed. |
Rename object files so that we don't have collisions between different object files coming from different projects.
Fixes #7586
Co-authored-by: Enrico Steffinlongo "enrico.steffinlongo@diffblue.com"
Co-authored-by: Fotis Koutoulakis "fotis.koutoulakis@diffblue.com"