-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
llvmPackages_git.*: Bump to newer commit #154465
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index c5003b5efa1d..4fffb9721284 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -5,6 +5,8 @@ | ||
|
||
cmake_minimum_required(VERSION 3.13.4) | ||
|
||
+include(GNUInstallDirs) | ||
+ | ||
# Check if compiler-rt is built as a standalone project. | ||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) | ||
project(CompilerRT C CXX ASM) | ||
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake | ||
index 1ada0ab30ba0..b4be6c4a3c73 100644 | ||
--- a/cmake/base-config-ix.cmake | ||
+++ b/cmake/base-config-ix.cmake | ||
@@ -66,7 +66,7 @@ if (LLVM_TREE_AVAILABLE) | ||
else() | ||
# Take output dir and install path from the user. | ||
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH | ||
- "Path where built compiler-rt libraries should be stored.") | ||
+ "Path where built compiler-rt build artifacts should be stored.") | ||
set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH | ||
"Path where built compiler-rt executables should be stored.") | ||
set(COMPILER_RT_INSTALL_PATH "" CACHE PATH | ||
@@ -98,23 +98,23 @@ endif() | ||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) | ||
set(COMPILER_RT_OUTPUT_LIBRARY_DIR | ||
${COMPILER_RT_OUTPUT_DIR}/lib) | ||
- extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib) | ||
+ extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}") | ||
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH | ||
"Path where built compiler-rt libraries should be installed.") | ||
else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) | ||
set(COMPILER_RT_OUTPUT_LIBRARY_DIR | ||
${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR}) | ||
- extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}") | ||
+ extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_LIBDIR}/${COMPILER_RT_OS_DIR}") | ||
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH | ||
"Path where built compiler-rt libraries should be installed.") | ||
endif() | ||
-extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" bin) | ||
+extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_BINDIR}") | ||
set(COMPILER_RT_INSTALL_BINARY_DIR "${default_install_path}" CACHE PATH | ||
"Path where built compiler-rt executables should be installed.") | ||
-extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" include) | ||
+extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_INCLUDEDIR}") | ||
set(COMPILER_RT_INSTALL_INCLUDE_DIR "${default_install_path}" CACHE PATH | ||
"Path where compiler-rt headers should be installed.") | ||
-extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" share) | ||
+extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_DATADIR}") | ||
set(COMPILER_RT_INSTALL_DATA_DIR "${default_install_path}" CACHE PATH | ||
"Path where compiler-rt data files should be installed.") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ lib, stdenv, llvm_meta, src, cmake, python3, fixDarwinDylibNames, version | ||
{ lib, stdenv, llvm_meta | ||
, monorepoSrc, runCommand | ||
, cmake, python3, fixDarwinDylibNames, version | ||
, libcxxabi | ||
, enableShared ? !stdenv.hostPlatform.isStatic | ||
|
||
|
@@ -10,12 +12,26 @@ | |
, headersOnly ? false | ||
}: | ||
|
||
let | ||
basename = "libcxx"; | ||
in | ||
|
||
stdenv.mkDerivation rec { | ||
pname = if headersOnly then "cxx-headers" else "libcxx"; | ||
pname = basename + lib.optionalString headersOnly "-headers"; | ||
inherit version; | ||
|
||
inherit src; | ||
sourceRoot = "source/libcxx"; | ||
src = runCommand "${pname}-src-${version}" {} '' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we maybe generalize this I don't think we can use filterSource for this sadly though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I think that would be good, just didn't do it yet. I did something similar in #82131 i should perhaps pull out. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that looks right! |
||
mkdir -p "$out" | ||
cp -r ${monorepoSrc}/cmake "$out" | ||
cp -r ${monorepoSrc}/${basename} "$out" | ||
mkdir -p "$out/libcxxabi" | ||
cp -r ${monorepoSrc}/libcxxabi/include "$out/libcxxabi" | ||
mkdir -p "$out/llvm" | ||
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm" | ||
cp -r ${monorepoSrc}/llvm/utils "$out/llvm" | ||
''; | ||
|
||
sourceRoot = "${src.name}/${basename}"; | ||
|
||
outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev"; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: it's
basename
here andbaseName
incompiler-rt
.