Displaying 2 results from an estimated 2 matches for "opt_fuse_init_array".
2019 Dec 12
2
X86 does not follow -fuse-init-array
...which is a triple with no OS, so Clang is doing something arbitrary. Grepping
>Clang sources shows that this flag is handled in an OS-specific manner:
>
>$ git grep -i fuse_init_array ../clang/lib/Driver/
>../clang/lib/Driver/ToolChains/Fuchsia.cpp: if (DriverArgs.hasFlag
>(options::OPT_fuse_init_array,
>../clang/lib/Driver/ToolChains/Gnu.cpp: if (DriverArgs.hasFlag
>(options::OPT_fuse_init_array,
>../clang/lib/Driver/ToolChains/NetBSD.cpp: if (DriverArgs.hasFlag
>(options::OPT_fuse_init_array,
>../clang/lib/Driver/ToolChains/WebAssembly.cpp: if (DriverArgs.hasFlag
>(clang::d...
2019 Dec 10
2
X86 does not follow -fuse-init-array
Hi Devs,
consider below testcases,
$cat test.cc
class B {
public:
B(int t) {
j=t;
}
int j;
};
B b(1);
==============
$clang test.cc -target -i386 -c -fuse-init-array
$llvm-objdump -h test.o |grep ctors
7 .ctors 00000004 00000000 DATA
8 .rel.ctors 00000008 00000000
As you can see it ignores the -fuse-init-array options.It happens for
x86,Other target like aarch64 is doing fine.