-
Notifications
You must be signed in to change notification settings - Fork 43
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
Initial support for building libcxx/libcxxabi on MOS. #310
base: main
Are you sure you want to change the base?
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,31 @@ | ||
# MOSLibCXX.cmake | ||
# Configure llvm-mos for building libcxx based on llvm-mos-sdk. | ||
# Usage for configuring: | ||
# cmake -C [path-to-this-file] ... | ||
|
||
set(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "CMake build type") | ||
|
||
# We need any hosted llvm-mos-sdk compiler capable of building binaries. | ||
set(CMAKE_C_COMPILER mos-sim-clang CACHE STRING "") | ||
set(CMAKE_CXX_COMPILER mos-sim-clang++ CACHE STRING "") | ||
|
||
set(LLVM_ENABLE_RUNTIMES libcxx;libcxxabi CACHE STRING "") | ||
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "") | ||
set(LIBCXXABI_ENABLE_PIC OFF CACHE BOOL "") | ||
set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "") | ||
set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "") | ||
set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") | ||
set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") | ||
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_FSTREAM OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_RTTI ON CACHE BOOL "") | ||
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_THREADS OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_UNICODE OFF CACHE BOOL "") | ||
set(LIBCXX_ENABLE_WIDE_CHARACTERS OFF CACHE BOOL "") | ||
set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") | ||
set(LIBCXX_TARGETING_MOS ON CACHE BOOL "") |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,7 +157,9 @@ using ::perror _LIBCPP_USING_IF_EXISTS; | |
|
||
using ::fopen _LIBCPP_USING_IF_EXISTS; | ||
using ::freopen _LIBCPP_USING_IF_EXISTS; | ||
#ifndef _LIBCPP_HAS_NO_REMOVE | ||
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. Is there something specific that makes remove different than all the other functions here? It seems odd to introduce a _LIBCPP_HAS_NO_REMOVE if not... maybe just #ifndef mos otherwise? |
||
using ::remove _LIBCPP_USING_IF_EXISTS; | ||
#endif | ||
using ::rename _LIBCPP_USING_IF_EXISTS; | ||
using ::tmpfile _LIBCPP_USING_IF_EXISTS; | ||
using ::tmpnam _LIBCPP_USING_IF_EXISTS; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ | |
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// FIXME: This file does not compile correctly under LLVM-MOS. | ||
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. TODO(llvm-mos): |
||
#if !defined(__mos__) | ||
|
||
#if defined(__MVS__) | ||
// As part of monotonic clock support on z/OS we need macro _LARGE_TIME_API | ||
// to be defined before any system header to include definition of struct timespec64. | ||
|
@@ -252,3 +255,5 @@ steady_clock::now() noexcept | |
} | ||
|
||
_LIBCPP_END_NAMESPACE_STD | ||
|
||
#endif |
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.
Let's call these TODO(llvm-mos); otherwise it will be more difficult to find them again. Consider filing issues for these too; that will make them easier to track.