Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
/ libcxx Public archive

Commit

Permalink
Upstream to AOSP ndk-release-r22
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Mar 25, 2021
1 parent 3ed0cca commit cca5298
Show file tree
Hide file tree
Showing 6,967 changed files with 836,240 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
13 changes: 13 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
BasedOnStyle: LLVM

---
Language: Cpp
Standard: Cpp03

AlwaysBreakTemplateDeclarations: true
PointerAlignment: Left

# Disable formatting options which may break tests.
SortIncludes: false
ReflowComments: false
---
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
#lib/ # We actually have things checked in to lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# MSVC libraries test harness
env.lst
keep.lst

# Editor by-products
.vscode/
109 changes: 109 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# This file is dual licensed under the MIT and the University of Illinois Open
# Source Licenses. See LICENSE.TXT for details.

LOCAL_PATH := $(call my-dir)

# libcxx defines
libcxx_includes := $(LOCAL_PATH)/include
libcxx_export_includes := $(libcxx_includes)
libcxx_sources := \
algorithm.cpp \
any.cpp \
atomic.cpp \
barrier.cpp \
bind.cpp \
charconv.cpp \
chrono.cpp \
condition_variable.cpp \
condition_variable_destructor.cpp \
debug.cpp \
exception.cpp \
filesystem/directory_iterator.cpp \
filesystem/int128_builtins.cpp \
filesystem/operations.cpp \
functional.cpp \
future.cpp \
hash.cpp \
ios.cpp \
iostream.cpp \
locale.cpp \
memory.cpp \
mutex.cpp \
mutex_destructor.cpp \
new.cpp \
optional.cpp \
random.cpp \
regex.cpp \
shared_mutex.cpp \
stdexcept.cpp \
string.cpp \
strstream.cpp \
system_error.cpp \
thread.cpp \
typeinfo.cpp \
utility.cpp \
valarray.cpp \
variant.cpp \
vector.cpp \

libcxx_sources := $(libcxx_sources:%=src/%)

libcxx_export_cxxflags :=

libcxx_cxxflags := \
-std=c++1z \
-DLIBCXX_BUILDING_LIBCXXABI \
-D_LIBCPP_NO_EXCEPTIONS \
-D_LIBCPP_NO_RTTI \
-D_LIBCPP_BUILDING_LIBRARY \
-D__STDC_FORMAT_MACROS \
$(libcxx_export_cxxflags) \


libcxx_ldflags :=
libcxx_export_ldflags :=

# libcxxabi defines
libcxxabi_src_files := \
abort_message.cpp \
cxa_aux_runtime.cpp \
cxa_default_handlers.cpp \
cxa_demangle.cpp \
cxa_exception_storage.cpp \
cxa_guard.cpp \
cxa_handlers.cpp \
cxa_noexception.cpp \
cxa_thread_atexit.cpp \
cxa_unexpected.cpp \
cxa_vector.cpp \
cxa_virtual.cpp \
fallback_malloc.cpp \
stdlib_exception.cpp \
stdlib_new_delete.cpp \
stdlib_stdexcept.cpp \
stdlib_typeinfo.cpp \

libcxxabi_src_files := $(libcxxabi_src_files:%=src/abi/%)

libcxxabi_includes := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/include/abi \

libcxxabi_cflags := -D__STDC_FORMAT_MACROS
libcxxabi_cppflags := \
-D_LIBCXXABI_NO_EXCEPTIONS \
-Wno-macro-redefined \
-Wno-unknown-attributes \
-DHAS_THREAD_LOCAL

include $(CLEAR_VARS)
LOCAL_MODULE := libcxx
LOCAL_SRC_FILES := $(libcxx_sources) $(libcxxabi_src_files)
LOCAL_C_INCLUDES := $(libcxx_includes) $(libcxxabi_includes)
LOCAL_CPPFLAGS := $(libcxx_cxxflags) $(libcxxabi_cppflags) -ffunction-sections -fdata-sections
LOCAL_EXPORT_C_INCLUDES := $(libcxx_export_includes)
LOCAL_EXPORT_CPPFLAGS := $(libcxx_export_cxxflags)
LOCAL_EXPORT_LDFLAGS := $(libcxx_export_ldflags)
LOCAL_ARM_NEON := false

include $(BUILD_STATIC_LIBRARY)
Loading

0 comments on commit cca5298

Please sign in to comment.