[all-commits] [llvm/llvm-project] b09970: [StackProtector] Do not emit the stack protector o...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Oct 31 08:42:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0997097355b3578c8061373899770928096f36b
      https://github.com/llvm/llvm-project/commit/b0997097355b3578c8061373899770928096f36b
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-10-31 (Tue, 31 Oct 2023)

  Changed paths:
    M clang/lib/CodeGen/CodeGenModule.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list