File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -523,6 +523,13 @@ unsigned HexagonToolChain::getOptimizationLevel(
523
523
void HexagonToolChain::addClangTargetOptions (const ArgList &DriverArgs,
524
524
ArgStringList &CC1Args,
525
525
Action::OffloadKind) const {
526
+ bool UseInitArrayDefault = false ;
527
+
528
+ if (!DriverArgs.hasFlag (options::OPT_fuse_init_array,
529
+ options::OPT_fno_use_init_array,
530
+ UseInitArrayDefault))
531
+ CC1Args.push_back (" -fno-use-init-array" );
532
+
526
533
if (DriverArgs.hasArg (options::OPT_ffixed_r19)) {
527
534
CC1Args.push_back (" -target-feature" );
528
535
CC1Args.push_back (" +reserved-r19" );
Original file line number Diff line number Diff line change 588
588
// RUN: | FileCheck -check-prefix=CHECK083 %s
589
589
// CHECK083: "-isysroot" "/hexagon"
590
590
// CHECK083: "-internal-externc-isystem" "/hexagon{{/|\\\\}}include"
591
+ // -----------------------------------------------------------------------------
592
+ // Passing -fno-use-init-array
593
+ // -----------------------------------------------------------------------------
594
+ // RUN: %clang -### -target hexagon-unknown-elf \
595
+ // RUN: -ccc-install-dir %S/Inputs/hexagon_tree/Tools/bin \
596
+ // RUN: -mcpu=hexagonv60 \
597
+ // RUN: %s 2>&1 \
598
+ // RUN: | FileCheck -check-prefix=CHECK084 %s
599
+ // CHECK084: "-fno-use-init-array"
You can’t perform that action at this time.
0 commit comments