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: use correct version of tablegen when cross compiling _8 and _9 #76887

Merged
merged 1 commit into from Jan 3, 2020

Conversation

corngood
Copy link
Contributor

@corngood corngood commented Jan 3, 2020

Motivation for this change

llvm_8 and llvm_9 were broken in cross compilation because they were using tblgen from llvm_7.

error from nix-build --arg crossSystem '{ system = "aarch64-linux"; }' -A llvm_9 on x86_64-linux:

Included from /build/llvm/lib/Transforms/InstCombine/InstCombineTables.td:2:
Included from /build/llvm/include/llvm/IR/Intrinsics.td:1245:
/build/llvm/include/llvm/IR/IntrinsicsNVVM.td:55:25: error: Unknown operator
  list<LLVMType> regs = !cond(
                        ^
Included from /build/llvm/lib/Transforms/InstCombine/InstCombineTables.td:2:
Included from /build/llvm/include/llvm/IR/Intrinsics.td:1245:
/build/llvm/include/llvm/IR/IntrinsicsNVVM.td:55:25: error: Unknown token when parsing a value
  list<LLVMType> regs = !cond(
                        ^
Included from /build/llvm/lib/Transforms/InstCombine/InstCombineTables.td:2:
Included from /build/llvm/include/llvm/IR/Intrinsics.td:1245:
/build/llvm/include/llvm/IR/IntrinsicsNVVM.td:55:25: error: expected ';' after declaration
  list<LLVMType> regs = !cond(
                        ^
make[2]: *** [lib/Transforms/InstCombine/CMakeFiles/InstCombineTableGen.dir/build.make:94: lib/Transforms/InstCombine/InstCombineTables.inc] Error 1

error from nix-build --arg crossSystem '{ system = "aarch64-linux"; }' -A llvm_8:

/build/llvm/include/llvm/IR/Intrinsics.td:95:1: error: Record `IntrCold' does not have a field named `ArgNo'!

def IntrCold : IntrinsicProperty;
^
make[2]: *** [include/llvm/IR/CMakeFiles/intrinsics_gen.dir/build.make:161: include/llvm/IR/IntrinsicEnums.inc] Error 1

See #52031

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

@FRidh FRidh added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Jan 3, 2020
@Ericson2314 Ericson2314 merged commit ebec1d1 into NixOS:master Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants