Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm] update to 11.0.0 #13998

Merged
merged 23 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3070841
[vcpkg] allow to use semicolons in COMMAND argument
yurybura Oct 12, 2020
b5c6e54
[llvm] update to 11.0.0
yurybura Oct 12, 2020
80209b5
Merge branch 'master' of https://github.com/microsoft/vcpkg into llvm
yurybura Oct 14, 2020
3b8885e
Merge branch 'master' of https://github.com/microsoft/vcpkg into llvm
yurybura Oct 15, 2020
5c9b03a
Merge branch 'master' of https://github.com/microsoft/vcpkg into llvm
yurybura Oct 26, 2020
5ea490a
Merge branch 'master' of https://github.com/microsoft/vcpkg into llvm
yurybura Nov 3, 2020
4fef3c8
[vcpkg] use latest version
yurybura Nov 3, 2020
9bd86e5
Merge branch 'master' of https://github.com/microsoft/vcpkg into llvm
yurybura Nov 13, 2020
a6ef450
Merge branch 'master' of https://github.com/microsoft/vcpkg into llvm
yurybura Nov 18, 2020
3a477f7
[vcpkg] allow to use semicolons in OPTIONS
yurybura Nov 18, 2020
bb44adb
fix vcpkg_fixup_cmake_targets
strega-nil Nov 19, 2020
c8f0609
[llvm] fix more install paths, add /bigobj option, fix up CMake targets
yurybura Nov 20, 2020
0ad9fec
Apply suggestions from code review
strega-nil Nov 20, 2020
9ac70a5
[llvm] fix clang, flang, lld, mlir and polly CMake targets
yurybura Nov 21, 2020
267ab39
[llvm] remove empty include directory /include/flang/Config
yurybura Nov 21, 2020
d857bf5
[llvm] Flang requires C++17
yurybura Nov 21, 2020
a0f0ccc
[llvm] add /Zc:__cplusplus
yurybura Nov 22, 2020
f802b33
[llvm] remove empty include directory include/clang-tidy/plugin
yurybura Nov 22, 2020
a65a22b
Merge branch 'master' of https://github.com/microsoft/vcpkg into llvm
yurybura Nov 24, 2020
814cb41
[llvm] try to fix ClangConfig.cmake, LLVMConfig.cmake, LLDConfig.cmak…
yurybura Nov 24, 2020
b908e46
[llvm] set tools install dir to tools/llvm
yurybura Nov 26, 2020
5e6c675
[aws-sdk-cpp] fix build after changes in vcpkg_configure_cmake.cmake
yurybura Nov 27, 2020
9d8a48f
[llvm] disable Flang and OpenMP on Windows
yurybura Nov 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ports/llvm/0001-add-bigobj-option.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 5ef22eb493b..e91c4c8d607 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -478,6 +478,10 @@ if( MSVC )
endif()
endif()
endif()
+ # By default MSVC has a 2^16 limit on the number of sections in an object file,
+ # but in many objects files need more than that. This flag is to increase the
+ # number of sections.
+ append("/bigobj" CMAKE_CXX_FLAGS)
endif( MSVC )

# Warnings-as-errors handling for GCC-compatible compilers:
30 changes: 0 additions & 30 deletions ports/llvm/0001-allow-to-use-commas.patch

This file was deleted.

42 changes: 0 additions & 42 deletions ports/llvm/0002-fix-install-paths.patch

This file was deleted.

22 changes: 22 additions & 0 deletions ports/llvm/0003-fix-openmp-debug.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index 81275c0483d..61468e048ec 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -136,7 +136,7 @@ libomp_get_ldflags(LIBOMP_CONFIGURED_LDFLAGS)
add_library(omp ${LIBOMP_LIBRARY_KIND} ${LIBOMP_SOURCE_FILES})

set_target_properties(omp PROPERTIES
- PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_LIB_FILE}"
+ PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_LIB_FILE}" DEBUG_POSTFIX ""
LINK_FLAGS "${LIBOMP_CONFIGURED_LDFLAGS}"
LINKER_LANGUAGE ${LIBOMP_LINKER_LANGUAGE}
)
@@ -215,7 +215,7 @@ if(WIN32)
# Create new import library that is just the previously created one + kmp_import.cpp
add_library(ompimp STATIC ${LIBOMP_GENERATED_IMP_LIB} kmp_import.cpp)
set_target_properties(ompimp PROPERTIES
- PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_IMP_LIB_FILE}"
+ PREFIX "" SUFFIX "" OUTPUT_NAME "${LIBOMP_IMP_LIB_FILE}" DEBUG_POSTFIX ""
LINKER_LANGUAGE C
)
add_dependencies(ompimp omp) # ensure generated import library is created first
15 changes: 0 additions & 15 deletions ports/llvm/0003-fix-vs2019-v16.6.patch

This file was deleted.

39 changes: 39 additions & 0 deletions ports/llvm/0006-workaround-msvc-bug.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp b/llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp
--- a/llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp
@@ -10,6 +10,17 @@
//
//===----------------------------------------------------------------------===//

+// Disable optimizations to work around MSVC debug mode bug in 32-bit:
+// https://developercommunity.visualstudio.com/content/problem/1179643/msvc-copies-overaligned-non-trivially-copyable-par.html
+// FIXME: Remove this when the issue is closed.
+#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_IX86)
+// We have to disable runtime checks in order to enable optimizations. This is
+// done for the entire file because the problem is actually observed in STL
+// template functions.
+#pragma runtime_checks("", off)
+#pragma optimize("gs", on)
+#endif
+
#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"

using namespace llvm;
diff --git a/llvm/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp b/llvm/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp
--- a/llvm/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp
+++ b/llvm/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp
@@ -406,3 +406,13 @@
32, 8, AtomicOrdering::NotAtomic }));
}
}
+
+// This code sequence doesn't do anything, but it covers a previously uncovered
+// codepath that used to crash in MSVC x86_32 debug mode.
+TEST(LegalizerInfoTest, MSVCDebugMiscompile) {
+ const LLT S1 = LLT::scalar(1);
+ const LLT P0 = LLT::pointer(0, 32);
+ LegalizerInfo LI;
+ auto Builder = LI.getActionDefinitionsBuilder(TargetOpcode::G_PTRTOINT);
+ (void)Builder.legalForCartesianProduct({S1}, {P0});
+}

23 changes: 17 additions & 6 deletions ports/llvm/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Source: llvm
Version: 10.0.0
Port-Version: 7
Version: 11.0.0
Homepage: https://llvm.org/
Description: The LLVM Compiler Infrastructure
Supports: !uwp
Expand All @@ -18,7 +17,7 @@ Build-Depends: llvm[core,target-x86] (x86|x64), llvm[core,target-arm] (arm&!arm6

Feature: target-all
Description: Build with all backends.
Build-Depends: llvm[core,target-aarch64,target-amdgpu,target-arm,target-bpf,target-hexagon,target-lanai,target-mips,target-msp430,target-nvptx,target-powerpc,target-riscv,target-sparc,target-systemz,target-webassembly,target-x86,target-xcore]
Build-Depends: llvm[core,target-aarch64,target-amdgpu,target-arm,target-avr,target-bpf,target-hexagon,target-lanai,target-mips,target-msp430,target-nvptx,target-powerpc,target-riscv,target-sparc,target-systemz,target-webassembly,target-x86,target-xcore]

Feature: target-aarch64
Description: Build with AArch64 backend.
Expand All @@ -29,6 +28,9 @@ Description: Build with AMDGPU backend.
Feature: target-arm
Description: Build with ARM backend.

Feature: target-avr
Description: Build with AVR backend.

Feature: target-bpf
Description: Build with BPF backend.

Expand Down Expand Up @@ -95,14 +97,23 @@ Description: Build Clang tools.
Feature: compiler-rt
Description: Build compiler's runtime libraries.

Feature: flang
Description: Build Fortran front end.
Build-Depends: llvm[core,mlir]

Feature: lld
Description: Build LLVM linker.

Feature: openmp
Description: Build LLVM OpenMP libraries.

Feature: lldb
Description: Build LLDB debugger.

Feature: mlir
Description: Build Multi-Level IR Compiler Framework.

Feature: openmp
Description: Build LLVM OpenMP libraries.
Build-Depends: llvm[core,utils]

Feature: polly
Description: Build polyhedral optimizations for LLVM.
Build-Depends: llvm[core,utils]
Loading