Skip to content

driver: force merge objects when building dynamic objects

Cheng Shao requested to merge type-dance/ghc:fix-llvm-ar into master

driver: force merge objects when building dynamic objects

This patch forces the driver to always merge objects when building dynamic objects even when ar -L is supported. It is an oversight of !8887 (closed): original rationale of that patch is favoring the relatively cheap ar -L operation over object merging when ar -L is supported, which makes sense but only if we are building static objects! Omitting check for whether we are building dynamic objects will result in broken .so files with undefined reference errors at executable link time when building GHC with llvm-ar. Fixes #22210 (closed).

Merge request reports