Bug 1731304 [wpt PR 30802] - Update wpt metadata, a=testonly
[gecko.git] / build / build-clang / revert-r362047-and-r362065_clang_12.patch
blob881ffed4be5e0c6a938b9f3e193719063babe2fb
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 diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
10 index d2f5d6bf80f0..424f4da01f77 100644
11 --- a/llvm/runtimes/CMakeLists.txt
12 +++ b/llvm/runtimes/CMakeLists.txt
13 @@ -59,7 +59,6 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
14 cmake_minimum_required(VERSION 3.13.4)
15 project(Runtimes C CXX ASM)
17 - find_package(LLVM PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
18 find_package(Clang PATHS "${LLVM_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
20 # Add the root project's CMake modules, and the LLVM build's modules to the
21 @@ -67,6 +66,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
22 list(INSERT CMAKE_MODULE_PATH 0
23 "${CMAKE_CURRENT_SOURCE_DIR}/../cmake"
24 "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules"
25 + "${LLVM_LIBRARY_DIR}/cmake/llvm"
28 # Some of the runtimes will conditionally use the compiler-rt sanitizers
29 @@ -81,6 +81,11 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
30 endif()
31 endif()
33 + # LLVMConfig.cmake contains a bunch of CMake variables from the LLVM build.
34 + # This file is installed as part of LLVM distributions, so this can be used
35 + # either from a build directory or an installed LLVM.
36 + include(LLVMConfig)
38 # Setting these variables will allow the sub-build to put their outputs into
39 # the library and bin directories of the top-level build.
40 set(LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR})
41 @@ -90,9 +95,6 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
42 set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR})
43 set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
45 - # This variable is used by individual runtimes to locate LLVM files.
46 - set(LLVM_PATH ${LLVM_BUILD_MAIN_SRC_DIR})
48 if(APPLE)
49 set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
50 endif()
51 @@ -421,6 +423,8 @@ ${error} Set RUNTIMES_BUILD_ALLOW_DARWIN to allow a single darwin triple.")
52 # Builtins were built separately above
53 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
54 -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
55 + -DLLVM_BINARY_DIR=${LLVM_BINARY_DIR}
56 + -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
57 -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
58 -DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
59 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default}
60 @@ -527,6 +531,8 @@ ${error} Set RUNTIMES_BUILD_ALLOW_DARWIN to allow a single darwin triple.")
61 # Builtins were built separately above
62 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
63 -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
64 + -DLLVM_BINARY_DIR=${LLVM_BINARY_DIR}
65 + -DLLVM_LIBRARY_DIR=${LLVM_LIBRARY_DIR}
66 -DLLVM_DEFAULT_TARGET_TRIPLE=${target}
67 -DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
68 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON