Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions clang/lib/Driver/ToolChains/Arch/PPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ void ppc::getPPCTargetFeatures(const Driver &D, const llvm::Triple &Triple,
D.Diag(diag::err_drv_argument_only_allowed_with)
<< "-maix-small-local-[exec|dynamic]-tls" << "-fdata-sections";
}

if (Args.hasArg(options::OPT_maix_shared_lib_tls_model_opt) &&
!(Triple.isOSAIX() && Triple.isArch64Bit()))
D.Diag(diag::err_opt_not_valid_on_target)
<< "-maix-shared-lib-tls-model-opt";
}

ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Driver &D, const llvm::Triple &Triple,
Expand Down
7 changes: 3 additions & 4 deletions clang/test/Driver/aix-shared-lib-tls-model-opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
// RUN: %clang -target powerpc64-unknown-aix -maix-shared-lib-tls-model-opt -S -emit-llvm \
// RUN: %s -o - | FileCheck %s --check-prefixes=CHECK-AIX,CHECK-AIX-ON

// FIXME: Clang driver diagnostic not implemented.
// RUN: true || not %clang -target powerpc-unknown-aix -maix-shared-lib-tls-model-opt \
// RUN: not %clang -target powerpc-unknown-aix -maix-shared-lib-tls-model-opt \
// RUN: -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-UNSUPPORTED-TARGET %s
// RUN: true || not %clang -target powerpc64le-unknown-linux-gnu -maix-shared-lib-tls-model-opt \
// RUN: not %clang -target powerpc64le-unknown-linux-gnu -maix-shared-lib-tls-model-opt \
// RUN: -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-UNSUPPORTED-TARGET %s
// RUN: true || not %clang -target powerpc64-unknown-linux-gnu -maix-shared-lib-tls-model-opt \
// RUN: not %clang -target powerpc64-unknown-linux-gnu -maix-shared-lib-tls-model-opt \
// RUN: -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-UNSUPPORTED-TARGET %s

int test(void) {
Expand Down
Loading