README: document LLVM_LINK_FLAGS

This commit is contained in:
William Woodruff 2021-06-29 13:43:27 -04:00
parent 89d27246b9
commit c909e7786e
No known key found for this signature in database
GPG Key ID: 70F70A3979DDCED3

View File

@ -29,6 +29,7 @@ bitcode in parallel, and is faster. A comparison between the two tools can be gl
| LLVM_COMPILER | *not supported* (clang only)| | LLVM_COMPILER | *not supported* (clang only)|
| LLVM_GCC_PREFIX | *not supported* (clang only)| | LLVM_GCC_PREFIX | *not supported* (clang only)|
| LLVM_DRAGONEGG_PLUGIN | *not supported* (clang only)| | LLVM_DRAGONEGG_PLUGIN | *not supported* (clang only)|
| LLVM_LINK_FLAGS | *not supported* |
This project, `gllvm`, provides tools for building whole-program (or This project, `gllvm`, provides tools for building whole-program (or
@ -252,6 +253,11 @@ produces the bitcode. This can be fulfilled by setting the
`LLVM_BITCODE_GENERATION_FLAGS` environment variable to the desired `LLVM_BITCODE_GENERATION_FLAGS` environment variable to the desired
flags, for example `"-flto -fwhole-program-vtables"`. flags, for example `"-flto -fwhole-program-vtables"`.
In other situations it is desirable to pass certain flags to `llvm-link` in the step
that merges multiple individual bitcode files together (i.e., within `get-bc`).
This can be fulfilled by setting the `LLVM_LINK_FLAGS` environment variable to
the desired flags, for example `"-internalize -only-needed"`.
## Beware of link time optimization. ## Beware of link time optimization.
If the package you are building happens to take advantage of recent `clang` developments If the package you are building happens to take advantage of recent `clang` developments