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

Incorrect version? #10

Closed
MabezDev opened this issue Jan 16, 2020 · 8 comments
Closed

Incorrect version? #10

MabezDev opened this issue Jan 16, 2020 · 8 comments

Comments

@MabezDev
Copy link

I've built the xtensa_release_9.x branch but when I run --version on any binaries they report 10.0.0svn, this breaks the build for my rust fork as the compiler interacts with llvm differently depending on the version see PassWrapper.cpp.

Full output from llc --version

LLVM (http://llvm.org/):
  LLVM version 10.0.0svn
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: znver1

  Registered Targets:
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64
    xtensa - Xtensa 32
@andreisfr
Copy link
Collaborator

Hi. @MabezDev ! Thank you for information. The xtensa_release_9.x branch is based on llvm-project master branch with latest commit llvm@0f30960#diff-b7c61103e5b04a057783630466888503 . So, on 30 September release_9.x was just published and release_10.x was only in plans. Do you have principal restrictions to use exactly release_9.x(not release_10.x) in Rust fork?

@MabezDev
Copy link
Author

MabezDev commented Jan 17, 2020

Do you have principal restrictions to use exactly release_9.x(not release_10.x) in Rust fork?

When building the compiler, it uses the output from llvm-config --version to determine the version of llvm. I have manually hard coded this value and the build still fails.

Rust has recently landed the changes required for the llvm 10 upgrade in rust-lang/rust#67900 but like you said this fork is based of a commit in master after the 9 release. This means the fork doesn't have all the required upstream changes for use with the Rust compiler (and I suspect any compiler looking to use LTO, as this API has changed a bit).

Perhaps we should rebase this fork from the 10.x release?

Great to see the fork is coming along nicely though! Is there a list of features it currently supports? I.e Can it do codegen now or does it still rely on an external assembler?

@gerekon
Copy link
Collaborator

gerekon commented Jan 17, 2020

Perhaps we should rebase this fork from the 10.x release?

@MabezDev Is this critical for you to work with release_10.x fork? AFAIK LLVM10 is not released yet.
So we'd prefer to fork from stable LLVM9 release 9.0.1 which is 30 days old. When the first stable LLVM10 will be released we will make a fork for it too.

@andreisfr
Copy link
Collaborator

Great to see the fork is coming along nicely though! Is there a list of features it currently supports? I.e Can it do codegen now or does it still rely on an external assembler?

The xtensa_release_9.x can generate object files, it uses binutils assembler only for *.S input files. Also added base support of disassembler and corrected some reported issues with atomic operations, indirect branches and other code improvements.

@MabezDev
Copy link
Author

@MabezDev Is this critical for you to work with release_10.x fork? AFAIK LLVM10 is not released yet.
So we'd prefer to fork from stable LLVM9 release 9.0.1 which is 30 days old. When the first stable LLVM10 will be released we will make a fork for it too.

No, in fact I'd much rather it was LLVM 9 actually. Forking from the stable 9.x release branch sounds like the best approach.

The xtensa_release_9.x can generate object files

Awesome! I think this will solve a number of issues on my end, will report back once I get it working.

Also added base support of disassembler and corrected some reported issues with atomic operations, indirect branches and other code improvements.

Excellent, I've had a few users reporting similiar issues

@MabezDev
Copy link
Author

@andreisfr FYI, locally I rebased onto the 9.x release and it works brilliantly.

I now have full debug info in Rust! I can step through, set breakpoints, inspect variables etc

2020-01-18-013717_1920x1045_scrot

Which will finally close #6 🎉

To clarify, is the plan to rebase this fork onto 9.0.1 stable release?

@andreisfr
Copy link
Collaborator

@MabezDev , good news, thanks)

To clarify, is the plan to rebase this fork onto 9.0.1 stable release?

Yes, we now rebase this fork to 9.0.1

@igrr
Copy link
Member

igrr commented Jan 24, 2020

The default branch of this repository is now based on release/9.x (9.0.1)

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

No branches or pull requests

4 participants