File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -544,7 +544,8 @@ unsigned HexagonToolChain::getOptimizationLevel(
544
544
void HexagonToolChain::addClangTargetOptions (const ArgList &DriverArgs,
545
545
ArgStringList &CC1Args,
546
546
Action::OffloadKind) const {
547
- bool UseInitArrayDefault = false ;
547
+
548
+ bool UseInitArrayDefault = getTriple ().isMusl ();
548
549
549
550
if (!DriverArgs.hasFlag (options::OPT_fuse_init_array,
550
551
options::OPT_fno_use_init_array,
Original file line number Diff line number Diff line change 664
664
// CHECK089: "/hexagon{{/|\\\\}}lib{{/|\\\\}}crt1.o"
665
665
// CHECK089-NOT: -lclang_rt.builtins-hexagon
666
666
// CHECK089-NOT: -lc
667
+ // -----------------------------------------------------------------------------
668
+ // Not Passing -fno-use-init-array when musl is selected
669
+ // -----------------------------------------------------------------------------
670
+ // RUN: %clang -### -target hexagon-unknown-linux-musl \
671
+ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
672
+ // RUN: -mcpu=hexagonv60 \
673
+ // RUN: %s 2>&1 \
674
+ // RUN: | FileCheck -check-prefix=CHECK090 %s
675
+ // CHECK090-NOT: -fno-use-init-array
676
+ // -----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments