mcgrathr created this revision. mcgrathr added reviewers: phosek, paulkirth, leonardchan. Herald added subscribers: VincentWu, abrachet, vkmr, evandro, luismarques, sameer.abuasal, s.egerton, Jim, benna, psnobl, rogfer01, shiva0217, kito-cheng, simoncook, arichardson. Herald added a project: All. mcgrathr requested review of this revision. Herald added subscribers: cfe-commits, pcwang-thead, eopXD, MaskRay. Herald added a project: clang.
The ShadowCallStack is the preferred and default ABI for Fuchsia. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D143357 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp clang/test/Driver/fuchsia.c Index: clang/test/Driver/fuchsia.c =================================================================== --- clang/test/Driver/fuchsia.c +++ clang/test/Driver/fuchsia.c @@ -31,6 +31,7 @@ // CHECK: "-isysroot" "[[SYSROOT:[^"]+]]" // CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include" // CHECK-AARCH64: "-fsanitize=shadow-call-stack" +// CHECK-RISCV64: "-fsanitize=shadow-call-stack" // CHECK-X86_64: "-fsanitize=safe-stack" // CHECK: "-stack-protector" "2" // CHECK-AARCH64: "-target-feature" "+outline-atomics" Index: clang/lib/Driver/ToolChains/Fuchsia.cpp =================================================================== --- clang/lib/Driver/ToolChains/Fuchsia.cpp +++ clang/lib/Driver/ToolChains/Fuchsia.cpp @@ -466,6 +466,7 @@ SanitizerMask Res; switch (getTriple().getArch()) { case llvm::Triple::aarch64: + case llvm::Triple::riscv64: Res |= SanitizerKind::ShadowCallStack; break; case llvm::Triple::x86_64:
Index: clang/test/Driver/fuchsia.c =================================================================== --- clang/test/Driver/fuchsia.c +++ clang/test/Driver/fuchsia.c @@ -31,6 +31,7 @@ // CHECK: "-isysroot" "[[SYSROOT:[^"]+]]" // CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include" // CHECK-AARCH64: "-fsanitize=shadow-call-stack" +// CHECK-RISCV64: "-fsanitize=shadow-call-stack" // CHECK-X86_64: "-fsanitize=safe-stack" // CHECK: "-stack-protector" "2" // CHECK-AARCH64: "-target-feature" "+outline-atomics" Index: clang/lib/Driver/ToolChains/Fuchsia.cpp =================================================================== --- clang/lib/Driver/ToolChains/Fuchsia.cpp +++ clang/lib/Driver/ToolChains/Fuchsia.cpp @@ -466,6 +466,7 @@ SanitizerMask Res; switch (getTriple().getArch()) { case llvm::Triple::aarch64: + case llvm::Triple::riscv64: Res |= SanitizerKind::ShadowCallStack; break; case llvm::Triple::x86_64:
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits