[all-commits] [llvm/llvm-project] 408e6d: [Driver][Gnu] Support -shared -static: pass -share...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Oct 19 01:09:53 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 408e6de8c09fc7e71329199947e977fe1c40caf1
https://github.com/llvm/llvm-project/commit/408e6de8c09fc7e71329199947e977fe1c40caf1
Author: Fangrui Song <i at maskray.me>
Date: 2021-10-19 (Tue, 19 Oct 2021)
Changed paths:
M clang/lib/Driver/ToolChains/Gnu.cpp
A clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0/crtbeginS.o
A clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0/crtendS.o
M clang/test/Driver/linux-ld.c
Log Message:
-----------
[Driver][Gnu] Support -shared -static: pass -shared to ld and use crtbeginS.o
This mode never works (mismatching crtbeginT.o and crtendS.o) and probably
unsupported by GCC on glibc based Linux distro (incorrect crtbeginT.o causes
linker error) but makes sense (-shared means building a shared object, -static
means avoid shared object dependencies) and can be used on musl based Linux
distro.
mingw supports this mode as well.
More information about the All-commits
mailing list