summaryrefslogtreecommitdiff
path: root/extra/llvm12/no-strict-aliasing-DwarfCompileUnit.patch
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2021-11-14 18:45:26 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2021-11-14 18:45:26 +0100
commit990b229364cf9eaf401ee17cbd8d6c4981d522eb (patch)
treee55e83b315256a771f51908cf0ec0c95f87d6fcf /extra/llvm12/no-strict-aliasing-DwarfCompileUnit.patch
parentc205ac4aa24e1241bf2905aa82ffe600502a59e6 (diff)
downloadpackages-990b229364cf9eaf401ee17cbd8d6c4981d522eb.tar.xz
extra/llvm12: added shim (for rust)
Diffstat (limited to 'extra/llvm12/no-strict-aliasing-DwarfCompileUnit.patch')
-rw-r--r--extra/llvm12/no-strict-aliasing-DwarfCompileUnit.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/extra/llvm12/no-strict-aliasing-DwarfCompileUnit.patch b/extra/llvm12/no-strict-aliasing-DwarfCompileUnit.patch
new file mode 100644
index 00000000..c7168869
--- /dev/null
+++ b/extra/llvm12/no-strict-aliasing-DwarfCompileUnit.patch
@@ -0,0 +1,13 @@
+diff --git a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
+index eb924282a75e..85929b54d6ce 100644
+--- a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
++++ b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
+@@ -44,3 +44,8 @@ add_llvm_component_library(LLVMAsmPrinter
+ Support
+ Target
+ )
++
++# https://bugs.llvm.org/show_bug.cgi?id=50611#c3
++if (CMAKE_COMPILER_IS_GNUCXX)
++ set_source_files_properties(DwarfCompileUnit.cpp PROPERTIES COMPILE_FLAGS -fno-strict-aliasing)
++endif()