bazel-contrib / toolchains_llvm

LLVM toolchain for bazel
Apache License 2.0
296 stars 213 forks source link

Added option to skip linking against `libunwind` #346

Closed mmaslankaprv closed 6 days ago

mmaslankaprv commented 3 months ago

It may sometimes be desired not to use libunwind. Added a bool_flag that allows the user to disable linking against the libunwind library.

To disable linking against libunwind use the following command line parameter:

--@toolchains_llvm//toolchain/config:libunwind=False
mmaslankaprv commented 3 months ago

Instead of making this a toolchain rule attribute, could we make it a feature? That would allow for greater flexibility and is a more well-known mechanism for C++ toolchain configuration.

I am not sure i understand how the feature would work in this case. It seems that there is no option to provide custom features to unix_cc_toolchain_config. It seems to me that we would have to call the cc_common.create_cc_toolchain_config_info directly

mmaslankaprv commented 3 months ago

Any updates here ?

rrbutani commented 3 months ago

Apologies — will take a look this week

mmaslankaprv commented 2 months ago

@rrbutani did you have a change to look at this ?

mmaslankaprv commented 2 months ago

gentle ping @rrbutani

mmaslankaprv commented 1 month ago

pushed version allowing disabling the complier-rt library separately from libunwind

rockwotj commented 1 month ago

Ping @fmeum @rrbutani

mmaslankaprv commented 1 week ago

Ping @fmeum @rrbutani