summaryrefslogtreecommitdiffstats
path: root/llvm/runtimes
Commit message (Collapse)AuthorAgeFilesLines
* [llvm/runtimes] Add runtimes as a dependency of clang-bootstrap-depsXin-Xin Wang2019-12-161-5/+8
| | | | | | | | | | | | | | Summary: With the new LLVM_ENABLE_RUNTIMES option introduced in https://reviews.llvm.org/D40233, compiler-rt can now be included as a runtime. Since compiler-rt is needed for PGO, runtimes needs to be included as a dependency of clang-bootstrap-deps when building the stage1 compiler. Reviewers: beanz, phosek, compnerd, smeenai, plotfi, xiaobai Reviewed By: phosek Subscribers: smeenai, beanz, phosek, mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71430
* [llvm] Add llvm-lipo dependency to runtimesXin-Xin Wang2019-12-161-2/+2
| | | | | | | | | | | | | | Summary: Currently, llvm-lipo is not specified as a dependency, but it is needed when building Darwin-x86_64 runtimes, so I'm adding it to the dependencies lists. Reviewers: alexshap, beanz, phosek, compnerd, smeenai, mtrent, plotfi, xiaobai Reviewed By: phosek, smeenai Subscribers: smeenai, mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71429
* Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds.Puyan Lotfi2019-09-241-1/+5
| | | | | | | | | | | | Second attempt: Now with ';' -> '|' replacement. On some platforms, certain runtimes are not supported. For runtimes builds of those platforms it would be nice if we could disable certain runtimes (ie libunwind on Windows). Differential Revision: https://reviews.llvm.org/D67195 llvm-svn: 372784
* Revert "Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds."Petr Hosek2019-09-111-4/+1
| | | | | | | This reverts commit r371566: this doesn't correctly handle the case where LLVM_ENABLE_RUNTIMES contains a list of values. llvm-svn: 371579
* Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds.Puyan Lotfi2019-09-101-1/+4
| | | | | | | | | | | | On some platforms, certain runtimes are not supported. For runtimes builds of those platforms it would be nice if we could disable certain runtimes (ie libunwind on Windows). Differential Revision: https://reviews.llvm.org/D67195 llvm-svn: 371566
* Setup testing target dependencies for default runtimesChris Bieneman2019-06-111-0/+2
| | | | | | | | | | | | | | | | Summary: The default runtimes targets aren't getting their dependencies configured correctly which results in check-runtimes failing when built from a clean build. Reviewers: phosek, compnerd Reviewed By: phosek Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63107 llvm-svn: 363015
* [CMake] Use libtool for runtimes when building for Apple platformPetr Hosek2019-06-021-0/+5
| | | | | | | | | | | | LLVM CMake build already uses libtool instead of ar when building for Apple platform and we should be using the same when building runtimes. To do so, this change extracts the logic for finding libtool into a separate file and then uses it from both the LLVM build as well as the LLVM runtimes build. Differential Revision: https://reviews.llvm.org/D62769 llvm-svn: 362313
* [CMake] Provide an option to use relative paths in debug infoPetr Hosek2019-05-311-0/+2
| | | | | | | | | | | | | | | | | CMake always uses absolute file paths in the generated compiler invocation which results in absolute file paths being embedded in debug info. This is undesirable when building a toolchain e.g. on bots as the debug info may embed the bot source checkout path which is meaningless anywhere else. This change introduces the LLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO which uses -fdebug-prefix-map (where supported) options to rewrite paths embedded into debug info with relative ones. Additionally, LLVM_SOURCE_PREFIX can be used to override the path to source directory with a different one. Differential Revision: https://reviews.llvm.org/D62622 llvm-svn: 362185
* [CMake] Use find_package(LLVM) instead of LLVMConfigPetr Hosek2019-05-301-9/+2
| | | | | | | | This addresses an issues introduced in r362047. Differential Revision: https://reviews.llvm.org/D62640 llvm-svn: 362065
* [CMake] Set LLVM_PATH in the runtimes buildPetr Hosek2019-05-301-4/+6
| | | | | | | | | | | This avoids using llvm-config for inferring various paths within the runtimes build. We also set LLVM_INCLUDE_DIR variable that's used by these builds and move assignment of LLVM_BINARY_DIR and LLVM_LIBRARY_DIR to the same location for consistency. Differential Revision: https://reviews.llvm.org/D62637 llvm-svn: 362047
* [CMake] [Runtimes] Set *_STANDALONE_BUILDChris Bieneman2019-05-291-0/+6
| | | | | | | | | | | | | | | | | | | | | Summary: The runtimes use `*_STANDALONE_BUILD=OFF` to signify that clang is an in-tree target. This is not the case with the runtime builds, so we really need this set to `ON`. In order to resolve the issues phosek was having with checks, we should use checks that don't link. We can use compiler-rt's `try_compile_only` as a basis for that. This patch is *required* to be able to run the runtime libraries check-* targets. Reviewers: smeenai, phosek, compnerd Reviewed By: phosek Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62410 llvm-svn: 362007
* [CMake] Fix issues building runtimesChris Bieneman2019-05-241-3/+5
| | | | | | | | This resolves two issues: (1) LIBCXX_HEADER_DIR is a very misleadingly named variable because it shouldn't be set to the header directory, instead it needs to be the root binary dir. (2) If you build runtimes without libcxx, we can't depend on the libcxx header target, so we should instaed refer to it by the variable name which will be unset if libcxx isn't present. llvm-svn: 361646
* [CMake] Fixing errors in r361513Chris Bieneman2019-05-231-1/+1
| | | | | | | | | | | | | | | | | Summary: I somehow messed this up. libcxx appends the subdirectories itself, so we don't need to add them here. Also, r361513 broke the "projects" build of libcxx because it always included the extra targets. Reviewers: lebedev.ri, mclow.lists Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62336 llvm-svn: 361535
* [CMake] Copy C++ headers before configuring runtimes buildChris Bieneman2019-05-231-4/+13
| | | | | | | | | | | | | | | | Summary: On some platforms C++ headers are packaged with the compiler not the sysroot. If you don't copy C++ headers into the build include directory during configuraiton of the outer build the C++ check during the runtime configuration may get inaccurate results. Reviewers: phosek, compnerd, smeenai, EricWF Reviewed By: compnerd Subscribers: EricWF, christof, libcxx-commits, mgorny, llvm-commits Tags: #llvm, #libc Differential Revision: https://reviews.llvm.org/D62155 llvm-svn: 361513
* [Runtimes] If LLVM_INCLUDE_TESTS=On depend on gtestChris Bieneman2019-05-221-0/+2
| | | | | | | | | | | | | | | | Summary: If we are building the tests for the runtimes we should make them depend on gtest so that gtest is built and ready before we run any of the check-* targets. Reviewers: phosek, compnerd Reviewed By: compnerd Subscribers: mgorny, winksaville, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62269 llvm-svn: 361436
* [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and ↵Petr Hosek2019-05-221-3/+5
| | | | | | | | | | | | | | | | | include/c++ This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/$target/c++ and include/c++ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59168 llvm-svn: 361432
* [CMake] Replace the sanitizer support in runtimes build with multilibPetr Hosek2019-04-221-25/+17
| | | | | | | | | | | | | | | This is a more generic solution; while the sanitizer support can be used only for sanitizer instrumented builds, the multilib support can be used to build other variants such as noexcept which is what we would like to use in Fuchsia. The name CMake target name uses the target name, same as for the regular runtimes build and the name of the multilib, concatenated with '+'. The libraries are installed in a subdirectory named after the multilib. Differential Revision: https://reviews.llvm.org/D60926 llvm-svn: 358935
* [runtime] Use --strip-all rather than --strip-sectionsPetr Hosek2019-03-101-1/+1
| | | | | | | | We need to preserve section headers for shared libraries. Differential Revision: https://reviews.llvm.org/D59184 llvm-svn: 355783
* [CMake] Support stripping and linking output to .build-id directoryPetr Hosek2019-03-092-0/+39
| | | | | | | | | | | | | | | | | | | | | When installing runtimes with install-runtimes-stripped, we don't want to just strip them, we also want to preserve the debugging information for potential debugging. To make it possible to later find the stripped debugging information, we want to use the .build-id layout: https://fedoraproject.org/wiki/RolandMcGrath/BuildID#Find_files_by_build_ID That is, for libfoo.so with build ID abcdef1234, the debugging information will be installed into lib/debug/.build-id/ab/cdef1234. llvm-objcopy already has support for stripping files and linking the debugging stripped output into the right location. However, CMake doesn't support customizing strip invocation for the *-stripped targets. So instead, we replace CMAKE_STRIP with a custom script that invokes llvm-objcopy with the right command line flags. Differential Revision: https://reviews.llvm.org/D59127 llvm-svn: 355765
* Revert "[runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/"Matthew Voss2019-03-081-5/+4
| | | | | | | | This broke the windows bots. This reverts commit 28302c66d2586074f77497d5dc4eac7182b679e0. llvm-svn: 355725
* [runtimes] Move libunwind, libc++abi and libc++ to lib/ and include/Petr Hosek2019-03-081-4/+5
| | | | | | | | | | | | | | | This change is a consequence of the discussion in "RFC: Place libs in Clang-dedicated directories", specifically the suggestion that libunwind, libc++abi and libc++ shouldn't be using Clang resource directory. Tools like clangd make this assumption, but this is currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build. This change addresses that by moving the output of these libraries to lib/<target> and include/ directories, leaving resource directory only for compiler-rt runtimes and Clang builtin headers. Differential Revision: https://reviews.llvm.org/D59013 llvm-svn: 355665
* [build] Rename clang-headers to clang-resource-headersShoaib Meenai2019-03-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The current install-clang-headers target installs clang's resource directory headers. This is different from the install-llvm-headers target, which installs LLVM's API headers. We want to introduce the corresponding target to clang, and the natural name for that new target would be install-clang-headers. Rename the existing target to install-clang-resource-headers to free up the install-clang-headers name for the new target, following the discussion on cfe-dev [1]. I didn't find any bots on zorg referencing install-clang-headers. I'll send out another PSA to cfe-dev to accompany this rename. [1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits Tags: #clang, #sanitizers, #lldb, #openmp, #llvm Differential Revision: https://reviews.llvm.org/D58791 llvm-svn: 355340
* [CMake][runtimes] Set clang-header dependency for builtinsPetr Hosek2019-02-201-16/+22
| | | | | | | | | | | | compiler-rt builtins depend on clang headers, but that dependency wasn't explicitly stated in the build system and we were relying on the transitive depenendecy via clang. However, when we're cross-compiling clang, we'll be using host compiler instead and that depenendecy is missing, breaking the build. Differential Revision: https://reviews.llvm.org/D58471 llvm-svn: 354524
* [CMake] Use variables rather than ":" delimitersPetr Hosek2019-02-161-5/+3
| | | | | | | | This is a follow up to D37644, this block was missed in that change. Differential Revision: https://reviews.llvm.org/D58093 llvm-svn: 354194
* [build] Remove a stray comment. NFCShoaib Meenai2019-02-121-1/+1
| | | | | | | The CMake change associated with this comment was removed but the comment got left behind. Add a newline instead. llvm-svn: 353793
* [CMake] Don't override required compiler flags in the runtimes buildPetr Hosek2019-02-121-13/+5
| | | | | | | | | Ensure that HandleLLVMOptions adds all necessary required flags, including -Wno-error when building with LLVM_ENABLE_WERROR enabled. Differential Revision: https://reviews.llvm.org/D58092 llvm-svn: 353790
* [CMake] Don't set <PROJECT>_STANDALONE_BUILDPetr Hosek2019-02-091-3/+6
| | | | | | | | | We shouldn't be treating runtimes builds as standalone builds since we have enough of the context loaded into the runtimes environment. Differential Revision: https://reviews.llvm.org/D57992 llvm-svn: 353601
* Revert "[CMake] Use __libc_start_main rather than fopen when checking for C ↵Petr Hosek2019-01-281-1/+1
| | | | | | | | | library" This reverts commit r352341: it broke the build on macOS which doesn't seem to provide __libc_start_main in its C library. llvm-svn: 352411
* [CMake] Use __libc_start_main rather than fopen when checking for C libraryPetr Hosek2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | The check_library_exists CMake uses a custom symbol definition. This is a problem when checking for C library symbols because Clang recognizes many of them as builtins, and returns the -Wbuiltin-requires-header (or -Wincompatible-library-redeclaration) error. When building with -Werror which is the default, this causes the check_library_exists check fail making the build think that C library isn't available. To avoid this issue, we should use a symbol that isn't recognized by Clang and wouldn't cause the same issue. __libc_start_main seems like reasonable choice that fits the bill. Differential Revision: https://reviews.llvm.org/D57142 llvm-svn: 352341
* Revert "[CMake] Pass Clang defaults to runtimes builds"Petr Hosek2018-07-131-4/+0
| | | | | | | This reverts commit r332923 which is no longer needed since its use has been reverted in r337033. llvm-svn: 337039
* [CMake] Set per-runtime library directory suffix in runtimes buildPetr Hosek2018-07-101-19/+4
| | | | | | | | | | | | Do not use LLVM_RUNTIMES_LIBDIR_SUFFIX variable which is an internal variable used by the runtimes build from individual runtimes, instead set per-runtime librarhy directory suffix variable which is necessary for the sanitized runtimes build to install libraries into correct location. Differential Revision: https://reviews.llvm.org/D49121 llvm-svn: 336713
* Support for multiarch runtimes layoutPetr Hosek2018-06-281-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a support for multiarch style runtimes layout, so in addition to the existing layout where runtimes get installed to: lib/clang/$version/lib/$os Clang now allows runtimes to be installed to: lib/clang/$version/$target/lib This also includes libc++, libc++abi and libunwind; today those are assumed to be in Clang library directory built for host, with the new layout it is possible to install libc++, libc++abi and libunwind into the runtime directory built for different targets. The use of new layout is enabled by setting the LLVM_ENABLE_RUNTIME_TARGET_DIR CMake variable and is supported by both projects and runtimes layouts. The runtimes CMake build has been further modified to use the new layout when building runtimes for multiple targets. Differential Revision: https://reviews.llvm.org/D45604 llvm-svn: 335809
* [CMake] Provide direct support for building sanitized runtimesPetr Hosek2018-06-271-9/+27
| | | | | | | | This avoids having to rely on magic separators and special parsing. Differential Revision: https://reviews.llvm.org/D48061 llvm-svn: 335704
* [CMake] Use variables rather than ":" delimitersPetr Hosek2018-06-271-11/+14
| | | | | | | | This is a more idiomatic CMake. Differential Revision: https://reviews.llvm.org/D37644 llvm-svn: 335703
* [CMake] Pass additional CMake tools to external projectsPetr Hosek2018-06-061-2/+2
| | | | | | | | | This is needed when the external projects try to use other tools besides just the compiler and the linker. Differential Revision: https://reviews.llvm.org/D47833 llvm-svn: 334136
* [CMake] Pass Clang defaults to runtimes buildsPetr Hosek2018-05-221-0/+4
| | | | | | | | This enables the use of Clang default options from runtimes CMake files. Differential Revision: https://reviews.llvm.org/D47168 llvm-svn: 332923
* [CMake] Support runtimes in distributionsChris Bieneman2018-05-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a new internal variable LLVM_RUNTIME_DISTRIBUTION_COMPONENTS which specifies distribution components that are part of runtime projects, and thus should be exposed from runtime configuraitons up into the top-level CMake configurations. This is required for allowing runtime components to be included in LLVM_DISTRIBUTION_COMPONENTS because we verify that the build and install targets exist for every component specified for the distribution. Without this patch runtimes and builtins can only be included in distributions in whole, not by component. Reviewers: phosek Reviewed By: phosek Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46705 llvm-svn: 332631
* [CMake] Enable warnings for runtimesKostya Kortchinsky2018-04-271-0/+3
| | | | | | | | | | | | | | | | | | | | | Summary: `HandleLLVMOptions` adds `-w` to the cflags if `LLVM_ENABLE_WARNINGS` is not on. With `-w`, `check_cxx_compiler_flag` doesn't error out for unsupported flags (for example `-mcrc` on x86_64), and those flags end up being detected as working - and really they aren't. I am not entirely sure what the best way to solve this is, but setting `LLVM_ENABLE_WARNINGS` prior to including `HandleLLVMOptions` does the job. Reviewers: phosek, beanz Reviewed By: phosek Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46079 llvm-svn: 331042
* [CMake][runtimes] Process common options in runtimes buildPetr Hosek2018-04-111-0/+7
| | | | | | | | | | | This was removed in D39932 but turned out this is actually needed because runtimes such as compiler-rt and libc++ rely on common options processing for setting certain flags such as -ffunction-sections and -fdata-sections. Differential Revision: https://reviews.llvm.org/D45507 llvm-svn: 329778
* [CMake] Support for cross-compilation when build runtimesPetr Hosek2018-01-081-0/+3
| | | | | | | | | | | When cross-compiling, we cannot use the just built toolchain, instead we need to use the host toolchain which we assume has a support for targeting the selected target platform. We also need to pass the path to the native version of llvm-config to external projects. Differential Revision: https://reviews.llvm.org/D41678 llvm-svn: 322046
* [runtimes] Add install-*-stripped targetsShoaib Meenai2017-12-081-2/+11
| | | | | | | | | These should be the only remaining missing install-*-stripped targets. They're modeled after the existing install targets. Differential Revision: https://reviews.llvm.org/D40927 llvm-svn: 320182
* [CMake][runtimes] Support monorepo layout with runtimes buildPetr Hosek2017-11-271-19/+46
| | | | | | | | | | We introduce a new variable LLVM_ENABLE_RUNTIMES which works similarly to LLVM_ENABLE_PROJECTS and allows specifying runtimes that will be enabled in the runtimes build. Differential Revision: https://reviews.llvm.org/D40233 llvm-svn: 319107
* [CMake][runtimes] Don't passthrough prefixes for non-default targetsPetr Hosek2017-11-171-1/+0
| | | | | | | | | | | | | The passthrough is useful for setting up the options for the default build, but we already have a different mechanism to pass CMake flags to builds for builtins and runtimes targets so this is not really needed there. Furthermore, when the flags are set for the default build, with the prefix passthrough set we have to explicitly override all options in other targets which can be cumbersome. Differential Revision: https://reviews.llvm.org/D39988 llvm-svn: 318571
* [CMake][runtimes] Use cmake_parse_arguments in runtimes functionsPetr Hosek2017-11-161-9/+18
| | | | | | | | | | | | Passing lists to functions in CMake is tricky, any list argument has to be quoted otherwise it'll be expanded. To avoid this issue, use cmake_parse_arguments in runtime functions and pass lists using a keyword argument which eliminates any ambiguity when dealing with lists. Differential Revision: https://reviews.llvm.org/D40087 llvm-svn: 318457
* [CMake][runtimes] Don't process common options in runtimes buildPetr Hosek2017-11-141-4/+0
| | | | | | | | | | | This is no longer needed for any of the runtimes build and it breaks in case we don't have the working compiler yet, e.g. when building a compiler that uses compiler-rt and libc++ as a default runtime, because these common options check whether these are available. Differential Revision: https://reviews.llvm.org/D39932 llvm-svn: 318227
* [CMake][runtimes] Set compiler as working even for default targetPetr Hosek2017-11-141-3/+8
| | | | | | | | | | | Even when building builtins and runtimes for the default target we shouldn't assume that the just built compiler is already useable. When the compiler uses compiler-rt and libc++ as the default runtime and C++ library, it won't be usable until we finish building runtimes. Differential Revision: https://reviews.llvm.org/D39715 llvm-svn: 318224
* [CMake][runtimes] Fix the variable namePetr Hosek2017-11-081-1/+1
| | | | | | | | This typo causes the llvm-lit path resolution to fail. Differential Revision: https://reviews.llvm.org/D39811 llvm-svn: 317742
* [CMake][runtimes] Use the same configuration for non-target and "default" targetPetr Hosek2017-09-081-97/+106
| | | | | | | | | | | | | | The default host target for builtins and runtimes has special behavior on some platforms, e.g. on Linux both i386 and x86_64 targets are being built. Specifying "default" as a target name should lead to the same behavior, which wasn't the case in the past. This patch unifies the configuration between the non-target and "default" target to produce the same behavior by moving the default configuration into a function that can be used from both paths. Differential Revision: https://reviews.llvm.org/D37450 llvm-svn: 312831
* [CMake][runtimes] Use target specific name for all runtimes targetsPetr Hosek2017-09-021-7/+9
| | | | | | | | | | | | | | | | We need to use target specific name for all runtimes targets. Target specific name means the name of target in the LLVM build is different from the name in runtimes build (in LLVM build, it's suffixed by the target itself). Previously we have only used target specific names for check targets collected through SUB_CHECK_TARGETS, but that's not sufficient, we need to use target specific names for all targets we're exposing in LLVM build. Fixes PR34335. Differential Revision: https://reviews.llvm.org/D37245 llvm-svn: 312405
* [CMake] Add more runtime configurations.Leo Li2017-09-011-0/+1
| | | | | | | | | | | | | | | Summary: - `project` is required when `runtime/CMakeList.txt` is the top-level `CMakeList.txt` file. This will establish version and policy settings. - `-D_FILE_OFFSET_BITS=64` should never be set for Android runtimes. Reviewers: srhines, pirama, beanz Subscribers: llvm-commits, srhines, mgorny Differential Revision: https://reviews.llvm.org/D35648 llvm-svn: 312302
OpenPOWER on IntegriCloud