Bug 1638136 [wpt PR 23617] - Clipboard API Tests: Move permissions tests to WPT....
[gecko.git] / build / build-clang / revert-r362047-and-r362065.patch
blob38dd47969197f4a74f9eaf1419c72deadfe7f602
1 Bisection found that r362047 (and its followup build fix r362065) cause the
2 build to install the android PGO library into the following location:
3 stage2/clang/lib/linux/libclang_rt.profile-arm-android.a
4 rather than the expected:
5 stage2/clang/lib64/clang/$VERSION/lib/linux/libclang_rt.profile-arm-android.a
7 For lack of any progress in debugging this, revert those two patches.
9 --- a/llvm/runtimes/CMakeLists.txt
10 +++ b/llvm/runtimes/CMakeLists.txt
11 @@ -59,13 +59,12 @@
12 cmake_minimum_required(VERSION 3.4.3)
13 project(Runtimes C CXX ASM)
15 - find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
17 # Add the root project's CMake modules, and the LLVM build's modules to the
18 # CMake module path.
19 list(INSERT CMAKE_MODULE_PATH 0
20 "${CMAKE_CURRENT_SOURCE_DIR}/../cmake"
21 "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules"
22 + "${LLVM_LIBRARY_DIR}/cmake/llvm"
25 # Some of the runtimes will conditionally use the compiler-rt sanitizers
26 @@ -80,6 +79,11 @@
27 endif()
28 endif()
30 + # LLVMConfig.cmake contains a bunch of CMake variables from the LLVM build.
31 + # This file is installed as part of LLVM distributions, so this can be used
32 + # either from a build directory or an installed LLVM.
33 + include(LLVMConfig)
35 # Setting these variables will allow the sub-build to put their outputs into
36 # the library and bin directories of the top-level build.
37 set(LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR})
38 @@ -89,9 +93,6 @@
39 set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR})
40 set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
42 - # This variable is used by individual runtimes to locate LLVM files.
43 - set(LLVM_PATH ${LLVM_BUILD_MAIN_SRC_DIR})
45 if(APPLE)
46 set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
47 endif()
48 @@ -380,6 +381,8 @@
49 # Builtins were built separately above
50 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
51 -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
52 + -DLLVM_BINARY_DIR=${LLVM_BINARY_DIR}
53 + -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
54 -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
55 -DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
56 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
57 @@ -470,6 +473,8 @@
58 # Builtins were built separately above
59 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
60 -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
61 + -DLLVM_BINARY_DIR=${LLVM_BINARY_DIR}
62 + -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
63 -DLLVM_DEFAULT_TARGET_TRIPLE=${target}
64 -DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
65 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON