-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Don't rebuild C static libs if the desired architecture/platform already exists #82
Conversation
SECP_DIR="${BUILD_DIR}/${PLATFORM_NAME}/libsecp256k1-${TARGET_ARCH}-apple-darwin.a" | ||
|
||
# If we haven't built our static library, let's go ahead and build it. Else, we can probably just not try and build at all. | ||
if [ ! -f $LIBWALLY_DIR ] || [ ! -f $SECP_DIR ] |
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 guess this means that if you change something in libwally-core you should clean the build 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.
correct, unfortunately Xcode changed its build system a couple of releases ago which does not allow for custom build targets to define their own clean behaviors when you clean from Xcode.
these lines here were meant to handle that case, but doesn't work: https://github.com/Sjors/libwally-swift/pull/82/files#diff-cf8443a1af8a2de0df5857abe08d2469008f13a0a65f4f984d3d60acdbc68679R95-R97
isa = PBXTargetDependency; | ||
target = 75B9EDFC2810F83700E31B4D /* LibWallyCore */; | ||
targetProxy = 75B9EE002810F88400E31B4D /* PBXContainerItemProxy */; | ||
targetProxy = 75683E51293049380014553B /* PBXContainerItemProxy */; |
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.
Did you mean to touch all these?
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.
hm, I don't see a reason why it should change -- let me take a second look here
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 thought maybe a checksum of some sort.
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.
yeah, you're right. it's the checksum of the scheme action we define here https://github.com/Sjors/libwally-swift/pull/82/files#diff-a0467817f744b83783e73e607681e81427686debb56a8ba92f697ba854994937R13
since our change works, I will go ahead and delete the pre-build script
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.
sorry, I misspoke, it was a checksum of our script, build-libwally.sh
. Either way, I just committed 2f7f66f to remove the unneeded pre-build script.
8118921
to
d7c12bc
Compare
Works great. I tested that it doesn't needlessly build libwally-core. I can now run individual tests (quickly). Cleaning the build folder doesn't trigger a rebuild either, which is a bit odd. But a |
I assume this won't really impact |
Yeah, this is unfortunately the result of custom build targets not being able to access and customize clean operations, as described here: #82 (comment)
I don't suppose so, |
Merged in fa1ce00. |
No description provided.