Skip to content
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

Set ZERO_AR_DATE=1 for ar and invoke bazel's libtool wrapper on macOS #136

Closed
wants to merge 1 commit into from
Closed

Conversation

steeve
Copy link
Contributor

@steeve steeve commented Jan 29, 2019

This PR does 2 things:

  • Add ZERO_AR_DATE=1 to the ar command env
  • Use bazel's libtool wrapper instead of directly invoking it

Continuing what was started at #120.

Signed-off-by: Steeve Morin <steeve.morin@gmail.com>
@allevato
Copy link
Member

Repeating my comment from the other PR:

I've given this some thought, and here's where I'm at: the Swift rules shouldn't be involved with the nitty-gritty details of static linking at all. The fact that swift_library has to make decisions about whether it should use ar or libtool is already going in the wrong direction.

Fortunately the work that's been going on with the C++/CROSSTOOL APIs (cc_common) will help us do the right thing. There are a couple gaps still in those APIs, but once they're ready, the Swift rules can just pass the .o files to that API and it'll do the right thing based on the CROSSTOOL being used, without having to worry about which tool is invoked or what platform it's on.

For that reason I'd prefer to wait for those APIs rather than cause more churn in the current code, especially when that churn would include pulling in platform-specific external dependencies (which we would also have to handle differently internally within Google). Implementing this in terms of the new API will be a nice clean-up opportunity.

@allevato
Copy link
Member

Now that #195 is pushed, this is no longer necessary—static archiving actions use the underlying C++ CROSSTOOL. So, if there are still any hermeticity issues with archiving, they should be fixed there.

@allevato allevato closed this Apr 23, 2019
@steeve steeve deleted the steeve/libtool branch April 23, 2019 17:26
@steeve
Copy link
Contributor Author

steeve commented Apr 23, 2019

thanks @allevato !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants