Skip to content

Commit 8a80cfe

Browse files
committed
[ATfE] Enable locale in libc++ with LLVM-libc
This is required for std::cout. This patch relies on the following: llvm/llvm-project#156330 llvm/llvm-project#156331
1 parent 0120264 commit 8a80cfe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arm-software/embedded/arm-runtimes/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,6 @@ if(ENABLE_CXX_LIBS)
858858
-DLIBCXX_ENABLE_THREADS=OFF
859859
-DLIBCXX_ENABLE_WIDE_CHARACTERS=OFF
860860
-DLIBCXX_ENABLE_FILESYSTEM=OFF
861-
-DLIBCXX_ENABLE_LOCALIZATION=OFF
862861
-DLIBCXX_ENABLE_UNICODE=OFF
863862
-DLIBUNWIND_ENABLE_THREADS=OFF
864863
-DLIBCXXABI_ENABLE_EXCEPTIONS=${ENABLE_EXCEPTIONS}

arm-software/embedded/llvmlibc-samples/src/cpp-baremetal-semihosting-llvmlibc/hello.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66

7-
#include <cstdio> // iostream is not supported yet
7+
#include <cstdio>
8+
#include <iostream>
89
#include <vector>
910

1011
int test_exceptions(int i)
@@ -30,7 +31,7 @@ int main(void) {
3031
try {
3132
int result = test_exceptions(0);
3233
} catch (...) {
33-
std::puts("Exception caught.");
34+
std::cout << "Exception caught." << std::endl;
3435
}
3536
return 0;
3637
}

0 commit comments

Comments
 (0)