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

llvmPackage_{3.4,3.5,3.7,3.8,3.9}: fix output of llvm-config #26713

Closed
wants to merge 1 commit into from

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Jun 19, 2017

llvm-config is a tool to output compile and linker flags, when compiling against llvm.

The tool however outputs static library names despite libllvm is build
as shared library on nixos. This was fixed for llvm 3.4, 3.5 and 3.7.

For llvm 3.8 and 3.9 it printed the library extension twice (.so.so).
This was fixed in 4.0 and the patch is backported to 3.8 and 3.9 in
this pull request.

$ for i in 34 35 37 38 39; do echo "\nllvm-$i"; nix-shell -p llvmPackages_$i.llvm --run 'llvm-config --libnames'; done

llvm-34
libLLVMInstrumentation.so libLLVMIRReader.so libLLVMAsmParser.so
...

llvm-35
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMipo.so
...

llvm-37
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMBitWriter.so
...

llvm-38
libLLVM-3.8.1.so

llvm-39
libLLVM-3.9.so

cc @vcunat @dezgeg

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

llvm-config is a tool to output compile and linker flags, when compiling against llvm.

The tool however outputs static library names despite libllvm is build
as shared library on nixos. This was fixed for llvm 3.4, 3.5 and 3.7.

For llvm 3.8 and 3.9 it printed the library extension twice (.so.so).
This was fixed in 4.0 and the patch is backported to 3.8 and 3.9 in
this pull request.

```
$ for i in 34 35 37 38 39; do echo "\nllvm-$i"; nix-shell -p llvmPackages_$i.llvm --run 'llvm-config --libnames'; done

llvm-34
libLLVMInstrumentation.so libLLVMIRReader.so libLLVMAsmParser.so
...

llvm-35
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMipo.so
...

llvm-37
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMBitWriter.so
...

llvm-38
libLLVM-3.8.1.so

llvm-39
libLLVM-3.9.so
```
@Mic92 Mic92 requested review from gebner and removed request for gebner June 19, 2017 14:28
@vcunat
Copy link
Member

vcunat commented Jun 19, 2017

I suspect this is only a mass rebuild on aarch64, so it could probably go to master directly. (mesa is using 4.x elsewhere)

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds OK. I see you tested it a bit...

@Mic92
Copy link
Member Author

Mic92 commented Jun 20, 2017

merged in b6bacc4

@Mic92 Mic92 closed this Jun 20, 2017
@Mic92 Mic92 deleted the llvm-config branch June 20, 2017 09:23
Mic92 added a commit that referenced this pull request Jun 20, 2017
llvm-config is a tool to output compile and linker flags, when compiling against llvm.

The tool however outputs static library names despite libllvm is build
as shared library on nixos. This was fixed for llvm 3.4, 3.5 and 3.7.

For llvm 3.8 and 3.9 it printed the library extension twice (.so.so).
This was fixed in 4.0 and the patch is backported to 3.8 and 3.9 in
this pull request.

```
$ for i in 34 35 37 38 39; do echo "\nllvm-$i"; nix-shell -p llvmPackages_$i.llvm --run 'llvm-config --libnames'; done

llvm-34
libLLVMInstrumentation.so libLLVMIRReader.so libLLVMAsmParser.so
...

llvm-35
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMipo.so
...

llvm-37
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMBitWriter.so
...

llvm-38
libLLVM-3.8.1.so

llvm-39
libLLVM-3.9.so
```

fixes #26713
@vcunat
Copy link
Member

vcunat commented Jun 21, 2017

I guess this is a good candidate for 17.03, too?

@Mic92
Copy link
Member Author

Mic92 commented Jun 21, 2017

yes.

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 this pull request may close these issues.

None yet

2 participants