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

YJIT: Use #[cfg] instead of if cfg! #7899

Merged
merged 1 commit into from
Jun 2, 2023
Merged

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Jun 2, 2023

Rust 1.70.0 came out and it seems to have broken our build. This is the same patch as #7893 for ruby_3_2 branch.

  = note: /usr/bin/ld: /tmp/cirrus-ci-build/yjit/target/debug/deps/yjit-0044bace7c3a8bfe.5b58a5nco7jhlap8.rcgu.o: in function `rb_yjit_record_exit_stack':
          /tmp/cirrus-ci-build/yjit/src/stats.rs:646: undefined reference to `rb_vm_insn_addr2opcode'
          /usr/bin/ld: /tmp/cirrus-ci-build/yjit/src/stats.rs:662: undefined reference to `rb_profile_frames'
          collect2: error: ld returned 1 exit status

if cfg! seems not reliable to avoid linking functions in the block, and apparently it stopped working in Rust 1.70.0. #[cfg] seems like the proper way to do it, so this PR uses it instead.

@matzbot matzbot requested a review from a team June 2, 2023 18:13
@k0kubun k0kubun merged commit 4e26ae3 into ruby:master Jun 2, 2023
96 checks passed
@k0kubun k0kubun deleted the yjit-cfg branch June 2, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants