Skip to content

build: fix rebuild rules for no prebuilt bindings #450

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

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

eranrund
Copy link
Contributor

This fixes the regression introduced by 0bb4c60#diff-fc1b9721ad58e6a299d6d6633dbc46caR335 and documented on #449

match target.as_str() {
"x86_64-unknown-linux-gnu" | "aarch64-unknown-linux-gnu" => {
file_path = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap())
.join("bindings")
.join(format!("{}-bindings.rs", &target));
println!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about add a comment so that future refactor will not break it again?

match target.as_str() {
"x86_64-unknown-linux-gnu" | "aarch64-unknown-linux-gnu" => {
file_path = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap())
.join("bindings")
.join(format!("{}-bindings.rs", &target));
println!(
"cargo:rerun-if-changed=bindings/{}",
file_path.as_path().as_os_str().to_str().unwrap()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to use relative path. Otherwise sharing building cache can become a problem.

@eranrund
Copy link
Contributor Author

@BusyJay made the changes, please take another look when you can. Thanks!

BusyJay
BusyJay previously approved these changes Mar 26, 2020
Copy link
Member

@BusyJay BusyJay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@BusyJay
Copy link
Member

BusyJay commented Mar 26, 2020

Please signoff your commits.

@BusyJay
Copy link
Member

BusyJay commented Mar 26, 2020

Note all commits in the PR needs to be signoff.

@eranrund
Copy link
Contributor Author

Rebased and force-pushed to fix that @BusyJay

Copy link
Member

@BusyJay BusyJay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hunterlxt PTAL

Copy link
Member

@hunterlxt hunterlxt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BusyJay BusyJay changed the title only emit rerun-if-changed=bindings to the target-specific file when it is being used (fix #449) build: fix rebuild rules for no prebuilt bindings Mar 26, 2020
@BusyJay BusyJay merged commit e5efde0 into tikv:master Mar 26, 2020
@eranrund
Copy link
Contributor Author

Thank you for moving quickly on merging this!

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