Skip to content

Support .json target files #4

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

Closed
RalfJung opened this issue Nov 30, 2022 · 6 comments · Fixed by #5
Closed

Support .json target files #4

RalfJung opened this issue Nov 30, 2022 · 6 comments · Fixed by #5

Comments

@RalfJung
Copy link
Owner

We currently don't support .json target files. At least I assume that to be the case since I never tested them. I also know absolutely nothing about how they work, so some help would be appreciated here. :)

@berkus
Copy link

berkus commented Dec 20, 2022

It's basically the LLVM target configuration dumped in a file via rustc command.

Here's a longer section with more details on intended use-case.

@RalfJung
Copy link
Owner Author

That would be helpful if I knew anything at all about LLVM target configurations. ;)

@RalfJung
Copy link
Owner Author

What would be useful for testing is to have a reasonably standard JSON file target. Is there something that can be relied upon to keep working, or all these all prone to breakage from rustc/LLVM changes?

@berkus
Copy link

berkus commented Dec 25, 2022

Basically, you don't need to know anything about the LLVM target configuration. This is just a json file required to build your code for a specific target (it sets up data alignment requirements, among other things), including panic handling, linker used etc.

As long as you pass it down to the rustc all should be good.

@RalfJung
Copy link
Owner Author

Is there a good default/standard target file to use as a test?

@berkus
Copy link

berkus commented Dec 25, 2022

What would be useful for testing is to have a reasonably standard JSON file target. Is there something that can be relied upon to keep working, or all these all prone to breakage from rustc/LLVM changes?

You can dump a default one using the commands I linked above. If you don't modify it then it will be the same as used by rustc for compiling for that target by default (one is used regardless of if you specify it or not).

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 a pull request may close this issue.

2 participants