
Relands commit 433c8d950cb3a1fa0977355ce0367e8c763a3f13 with fixes for MIPS. Similar to D102742, specifying the stack alignment via CodegenOpts means that this flag gets dropped during LTO, unless the command line is re-specified as a plugin opt. Instead, encode this information as a module level attribute so that we don't have to expose this llvm internal flag when linking the Linux kernel with LTO. Looks like external dependencies might need a fix: * https://github.com/llvm-hs/llvm-hs/issues/345 * https://github.com/halide/Halide/issues/6079 Link: https://github.com/ClangBuiltLinux/linux/issues/1377 Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D103048
16 lines
600 B
LLVM
16 lines
600 B
LLVM
; RUN: split-file %s %t
|
|
; RUN: llvm-link %t/main.ll %t/8.ll
|
|
; RUN: not llvm-link %t/main.ll %t/16.ll 2>&1 | FileCheck --check-prefix=CHECK-16 %s
|
|
|
|
;--- main.ll
|
|
; NONE: error: linking module flags 'override-stack-alignment': IDs have conflicting values
|
|
; CHECK-16: error: linking module flags 'override-stack-alignment': IDs have conflicting values
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 1, !"override-stack-alignment", i32 8}
|
|
;--- 8.ll
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 1, !"override-stack-alignment", i32 8}
|
|
;--- 16.ll
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 1, !"override-stack-alignment", i32 16}
|