llvm/lld
Fangrui Song c0065f1182 [ELF] Default to --no-fortran-common
D86142 introduced --fortran-common and defaulted it to true (matching GNU ld
but deviates from gold/macOS ld64). The default state was motivated by transparently
supporting some FORTRAN 77 programs (Fortran 90 deprecated common blocks).
Now I think it again. I believe we made a mistake to change the default:

* this is a weird and legacy rule, though the breakage is very small
* --fortran-common introduced complexity to parallel symbol resolution and will slow down it
* --fortran-common more likely causes issues when users mix COMMON and
  STB_GLOBAL definitions (see https://github.com/llvm/llvm-project/issues/48570 and
  https://maskray.me/blog/2022-02-06-all-about-common-symbols).
  I have seen several issues in our internal projects and Android.
  On the other hand, --no-fortran-common is safer since
  COMMON/STB_GLOBAL have the same semantics related to archive member extraction.

Therefore I think we should switch back, not punishing the common uage.
A platform wanting --fortran-common can implement ld.lld as a shell script
wrapper around `lld -flavor gnu --fortran-common "$@"`.

Reviewed By: ikudrin, sfertile

Differential Revision: https://reviews.llvm.org/D122450
2022-03-30 09:12:09 -07:00
..
cmake/modules
COFF [Option] Avoid using the default argument for the 3-argument hasFlag. NFC 2022-03-26 00:57:06 -07:00
Common Cleanup codegen includes 2022-03-16 08:43:00 +01:00
docs [ELF] Default to --no-fortran-common 2022-03-30 09:12:09 -07:00
ELF [ELF] Default to --no-fortran-common 2022-03-30 09:12:09 -07:00
include/lld [lld] Make error handling functions opaque 2022-02-17 11:54:57 -08:00
MachO [lld][Macho][NFC] Encapsulate priorities map in a priority class 2022-03-23 13:57:26 -04:00
MinGW
test [ELF] Default to --no-fortran-common 2022-03-30 09:12:09 -07:00
tools/lld
utils
wasm [lld][WebAssembly] Fix crash accessing non-live __tls_base symbol 2022-03-17 13:59:45 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [lld] Require C++14 in LLD standalone build 2022-02-22 18:15:29 -05:00
CODE_OWNERS.TXT
LICENSE.TXT
README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.

Benchmarking

In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.

It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz

The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.