[StackProtector] Do not emit the stack protector on GPU architectures (#70799)
Summary: This patch changes the code generation to not emit the stack protector metadata on unsupported architectures. The issue was caused by system toolchains emitting stack protector option by default which would lead to errors when compiling for the GPU. I elected to change the code generation as we may want to update this in the future so we should keep the `clang` Driver code common. Although the user can use some combination of `-Xarch-device -fno-stack-protector` to override this, it is very irritating to do when we shouldn't emit this incompatible IR anyway. Fixes: https://github.com/llvm/llvm-project/issues/65911
Loading
Please sign in to comment