Skip to content

Commit b005fbe

Browse files
support aarch64
1 parent 755b5d0 commit b005fbe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6407,7 +6407,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
64076407
if (!A->getOption().matches(
64086408
options::OPT_fno_partition_static_data_sections)) {
64096409
// This codegen pass is only available on x86 and AArch64 ELF targets.
6410-
if (Triple.isX86() && Triple.isOSBinFormatELF())
6410+
if ((Triple.isX86() || Triple.isAArch64()) && Triple.isOSBinFormatELF())
64116411
A->render(Args, CmdArgs);
64126412
else
64136413
D.Diag(diag::err_drv_unsupported_opt_for_target)

clang/test/Driver/fpartition-static-data-sections.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %clang -### --target=x86_64 -fpartition-static-data-sections %s 2>&1 | FileCheck %s --check-prefixes=OPT
2-
// RUN: not %clang -### --target=aarch64 -fpartition-static-data-sections %s 2>&1 | FileCheck %s --check-prefixes=ERR
2+
// RUN: %clang -### --target=aarch64 -fpartition-static-data-sections %s 2>&1 | FileCheck %s --check-prefixes=OPT
3+
4+
// RUN: not %clang -### --target=arm -fpartition-static-data-sections %s 2>&1 | FileCheck %s --check-prefixes=OPT
35

46
// RUN: %clang -### --target=x86_64 -fpartition-static-data-sections -fno-partition-static-data-sections %s 2>&1 | FileCheck %s --implicit-check-not="-fpartition-static-data-sections"
57

0 commit comments

Comments
 (0)