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

llvm: support overriding experimental targets #54995

Closed
wants to merge 1 commit into from

Conversation

sbourdeauducq
Copy link
Contributor

Motivation for this change

Allow building LLVM with support for experimental targets and RISC-V in particular.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Fits CONTRIBUTING.md.

@dtzWill
Copy link
Member

dtzWill commented Jan 31, 2019

Quick question: is there currently a good way to interact with these arguments?

What I mean is-- often you'll want essentially a new llvmPackages set (at least llvm+clang, possibly libc++and other runtime libraries) built with a "llvm" that has a particular set of targets or such.

If there isn't, how are folks using this (or expected to use it)? Would it be difficult to make this easier?


In the near-ish future we may end up building it as a giant repo since that's the direction the LLVM project has moved in the past few years and especially with the git monorepo migration. And if we're building it all together anyway things might be somewhat easier re:plumbing a new set of targets. Just mentioning so we don't create this nice abstraction that's immediately obsolete :).

Anyway, this change LGTM modulo a few details I'll look into shortly. Mostly checking that llvmBackendList does what it sounds like it does ;).

@dtzWill
Copy link
Member

dtzWill commented Jan 31, 2019

Ah, llvmBackendList was dropped in d6f401e which is part of my confusion (#53941). Resolving this should be done before merging, otherwise it'll fall to whoever tries to merge staging/master next and that's no good :).

@Mic92
Copy link
Member

Mic92 commented Jan 31, 2019

Yeah, should be rebased onto staging.

@sbourdeauducq
Copy link
Contributor Author

Quick question: is there currently a good way to interact with these arguments?

Not really, building the additional targets has the problems you describe.

If the direction where you're going is to build LLVM with all targets, then I'm happy with RISCV added alongside WebAssembly instead of this patch.

@Mic92
Copy link
Member

Mic92 commented Feb 1, 2019

Given that we already build llvm with all kinds of weird architectures https://llvm.org/doxygen/Triple_8h_source.html it would be hard to justify not just to include risc-v in the list.

cc @shlevy (as you did risc-v stuff in the past)

@sbourdeauducq
Copy link
Contributor Author

OK, let's close this PR then.

@sbourdeauducq sbourdeauducq deleted the for-upstream branch February 2, 2019 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants