Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 3 additions & 37 deletions libcxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ include(HandleCompilerRT)
# Basic options ---------------------------------------------------------------
option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
option(LIBCXX_ENABLE_STATIC "Build libc++ as a static library." ON)
option(LIBCXX_ENABLE_EXCEPTIONS "Enable exceptions in the built library." ON)
option(LIBCXX_ENABLE_RTTI
"Use runtime type information.
This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF." ON)
option(LIBCXX_ENABLE_FILESYSTEM
"Whether to include support for parts of the library that rely on a filesystem being
available on the platform. This includes things like most parts of <filesystem> and
Expand Down Expand Up @@ -164,8 +160,8 @@ if (WIN32 OR MINGW OR ANDROID OR "${CMAKE_SYSTEM_NAME}" MATCHES "AIX"
OR NOT LIBCXX_ENABLE_THREADS
OR NOT LIBCXX_ENABLE_FILESYSTEM
OR NOT LIBCXX_ENABLE_RANDOM_DEVICE
OR NOT LIBCXX_ENABLE_EXCEPTIONS
OR NOT LIBCXX_ENABLE_RTTI)
OR NOT RUNTIMES_ENABLE_EXCEPTIONS
OR NOT RUNTIMES_ENABLE_RTTI)
set(_include_benchmarks OFF)
else()
set(_include_benchmarks ON)
Expand Down Expand Up @@ -358,12 +354,6 @@ if (LIBCXX_HAS_PTHREAD_API)
endif()
endif()

if (NOT LIBCXX_ENABLE_RTTI AND LIBCXX_ENABLE_EXCEPTIONS)
message(FATAL_ERROR "Libc++ cannot be built with exceptions enabled but RTTI"
" disabled, since that configuration is broken. See"
" https://llvm.org/PR66117 for details.")
endif()

if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
if (APPLE)
message(FATAL_ERROR "LIBCXX_ENABLE_ABI_LINKER_SCRIPT cannot be used on APPLE targets")
Expand Down Expand Up @@ -540,29 +530,6 @@ function(cxx_add_basic_build_flags target)
target_compile_options(${target} PUBLIC "${LIBCXX_ADDITIONAL_COMPILE_FLAGS}")
endfunction()

# Exception flags =============================================================
function(cxx_add_exception_flags target)
if (LIBCXX_ENABLE_EXCEPTIONS)
# Catches C++ exceptions only and tells the compiler to assume that extern C
# functions never throw a C++ exception.
target_add_compile_flags_if_supported(${target} PUBLIC -EHsc)
else()
target_add_compile_flags_if_supported(${target} PUBLIC -EHs- -EHa-)
target_add_compile_flags_if_supported(${target} PUBLIC -fno-exceptions)
endif()
endfunction()

# RTTI flags ==================================================================
function(cxx_add_rtti_flags target)
if (NOT LIBCXX_ENABLE_RTTI)
if (MSVC)
target_add_compile_flags_if_supported(${target} PUBLIC -GR-)
else()
target_add_compile_flags_if_supported(${target} PUBLIC -fno-rtti)
endif()
endif()
endfunction()

# Modules flags ===============================================================
# FIXME The libc++ sources are fundamentally non-modular. They need special
# versions of the headers in order to provide C++03 and legacy ABI definitions.
Expand Down Expand Up @@ -817,11 +784,10 @@ function(cxx_add_common_build_flags target)
cxx_add_basic_build_flags(${target})
cxx_add_warning_flags(${target} ${LIBCXX_ENABLE_WERROR} ${LIBCXX_ENABLE_PEDANTIC})
cxx_add_windows_flags(${target})
cxx_add_exception_flags(${target})
cxx_add_rtti_flags(${target})
cxx_add_module_flags(${target})
cxx_link_system_libraries(${target})
target_link_libraries(${target} PRIVATE cxx-sanitizer-flags)
target_link_libraries(${target} PRIVATE runtimes-language-flags)
endfunction()

#===============================================================================
Expand Down
7 changes: 4 additions & 3 deletions libcxx/cmake/caches/AMDGPU.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Configuration options for all the runtimes
set(RUNTIMES_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_ENABLE_RTTI OFF CACHE BOOL "")

# Configuration options for libcxx.
set(LIBCXX_CXX_ABI libcxxabi CACHE STRING "")
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
set(LIBCXX_ENABLE_LOCALIZATION ON CACHE BOOL "")
set(LIBCXX_ENABLE_MONOTONIC_CLOCK ON CACHE BOOL "")
set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS ON CACHE BOOL "")
set(LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
set(LIBCXX_ENABLE_RTTI OFF CACHE BOOL "")
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC ON CACHE BOOL "")
Expand All @@ -21,7 +23,6 @@ set(RUNTIMES_USE_LIBC "llvm-libc" CACHE STRING "")

# Configuration options for libcxxabi.
set(LIBCXXABI_BAREMETAL ON CACHE BOOL "")
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "")
Expand Down
5 changes: 2 additions & 3 deletions libcxx/cmake/caches/Armv7M-picolibc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set(CMAKE_C_FLAGS "-mfloat-abi=soft" CACHE STRING "")
set(CMAKE_SYSTEM_NAME Generic CACHE STRING "")
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE STRING "")
set(LLVM_USE_LINKER "lld" CACHE STRING "")
set(RUNTIMES_ENABLE_EXCEPTIONS ON CACHE BOOL "")
set(RUNTIMES_ENABLE_RTTI ON CACHE BOOL "")
set(COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
set(COMPILER_RT_BUILD_LIBFUZZER OFF CACHE BOOL "")
set(COMPILER_RT_BUILD_PROFILE OFF CACHE BOOL "")
Expand All @@ -14,17 +16,14 @@ set(COMPILER_RT_BUILD_XRAY OFF CACHE BOOL "")
set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOOL "")
set(LIBCXXABI_BAREMETAL ON CACHE BOOL "")
set(LIBCXXABI_ENABLE_ASSERTIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_EXCEPTIONS ON CACHE BOOL "")
set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_STATIC ON CACHE BOOL "")
set(LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "")
set(LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
set(LIBCXX_ENABLE_EXCEPTIONS ON CACHE BOOL "")
set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE STRING "")
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_STATIC ON CACHE BOOL "")
set(LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
Expand Down
3 changes: 1 addition & 2 deletions libcxx/cmake/caches/Armv7Thumb-no-exceptions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
set(CMAKE_CXX_COMPILER_TARGET "armv7l-linux-gnueabihf" CACHE STRING "")
set(CMAKE_CXX_FLAGS "-mthumb" CACHE STRING "")
set(CMAKE_C_FLAGS "-mthumb" CACHE STRING "")
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXX_TEST_PARAMS "enable_modules=clang" CACHE STRING "")
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
3 changes: 1 addition & 2 deletions libcxx/cmake/caches/Armv8Thumb-no-exceptions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
set(CMAKE_CXX_COMPILER_TARGET "armv8l-linux-gnueabihf" CACHE STRING "")
set(CMAKE_CXX_FLAGS "-mthumb" CACHE STRING "")
set(CMAKE_C_FLAGS "-mthumb" CACHE STRING "")
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXX_TEST_PARAMS "enable_modules=clang" CACHE STRING "")
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
3 changes: 1 addition & 2 deletions libcxx/cmake/caches/Generic-no-exceptions.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_ENABLE_EXCEPTIONS OFF CACHE BOOL "")

# Speed up the CI
set(LIBCXX_TEST_PARAMS "enable_modules=clang" CACHE STRING "")
Expand Down
6 changes: 2 additions & 4 deletions libcxx/cmake/caches/Generic-no-rtti.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
set(LIBCXX_ENABLE_RTTI OFF CACHE BOOL "")
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_RTTI OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_ENABLE_RTTI OFF CACHE BOOL "")
set(RUNTIMES_ENABLE_EXCEPTIONS OFF CACHE BOOL "")

# Speed up the CI
set(LIBCXX_TEST_PARAMS "enable_modules=clang" CACHE STRING "")
Expand Down
7 changes: 4 additions & 3 deletions libcxx/cmake/caches/NVPTX.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Configuration options for the runtimes.
set(RUNTIMES_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(RUNTIMES_ENABLE_RTTI OFF CACHE BOOL "")

# Configuration options for libcxx.
set(LIBCXX_CXX_ABI libcxxabi CACHE STRING "")
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
set(LIBCXX_ENABLE_LOCALIZATION ON CACHE BOOL "")
set(LIBCXX_ENABLE_MONOTONIC_CLOCK ON CACHE BOOL "")
set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS ON CACHE BOOL "")
set(LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
set(LIBCXX_ENABLE_RTTI OFF CACHE BOOL "")
set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
set(LIBCXX_ENABLE_STATIC ON CACHE BOOL "")
Expand All @@ -21,7 +23,6 @@ set(RUNTIMES_USE_LIBC "llvm-libc" CACHE STRING "")

# Configuration options for libcxxabi.
set(LIBCXXABI_BAREMETAL ON CACHE BOOL "")
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "")
Expand Down
7 changes: 1 addition & 6 deletions libcxx/docs/Modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,10 @@ What works
* ``LIBCXX_ENABLE_FILESYSTEM``
* ``LIBCXX_ENABLE_RANDOM_DEVICE``
* ``LIBCXX_ENABLE_UNICODE``
* ``LIBCXX_ENABLE_EXCEPTIONS`` [#note-no-windows]_
* ``RUNTIMES_ENABLE_EXCEPTIONS``

* A C++20 based extension

.. note::

.. [#note-no-windows] This configuration will probably not work on Windows
due to hard-coded compilation flags.

Some of the current limitations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
13 changes: 1 addition & 12 deletions libcxx/docs/VendorDocumentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,7 @@ General purpose options

Additional libraries libc++ is linked to which can be provided in cache.

.. option:: LIBCXX_ENABLE_EXCEPTIONS:BOOL

**Default**: ``ON``

Build libc++ with exception support.

.. option:: LIBCXX_ENABLE_RTTI:BOOL

**Default**: ``ON``

Build libc++ with run time type information.
This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF.
.. TODO: Where should we document the runtimes build options?

.. option:: LIBCXX_INCLUDE_TESTS:BOOL

Expand Down
2 changes: 1 addition & 1 deletion libcxx/lib/abi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cxx_abi_list_identifier(abi_list_identifier
"${LIBCXX_CXX_ABI}"
"${LIBCXX_ABI_VERSION}"
"${LIBCXX_ABI_UNSTABLE}"
"${LIBCXX_ENABLE_EXCEPTIONS}"
"${RUNTIMES_ENABLE_EXCEPTIONS}"
"${LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS}"
)

Expand Down
10 changes: 1 addition & 9 deletions libcxx/modules/CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ target_sources(std

target_include_directories(std SYSTEM PUBLIC @LIBCXX_CONFIGURED_INCLUDE_DIRS@)

if (NOT @LIBCXX_ENABLE_EXCEPTIONS@)
target_compile_options(std PUBLIC -fno-exceptions)
endif()

target_compile_options(std
PUBLIC
-nostdinc++
Expand All @@ -58,7 +54,7 @@ target_compile_options(std
-Wno-reserved-user-defined-literal
)
target_link_options(std PUBLIC -nostdlib++ -Wl,-rpath,@LIBCXX_LIBRARY_DIR@ -L@LIBCXX_LIBRARY_DIR@)
target_link_libraries(std c++)
target_link_libraries(std c++ runtimes-language-flags)
set_target_properties(std
PROPERTIES
OUTPUT_NAME "c++std"
Expand All @@ -74,10 +70,6 @@ target_sources(std.compat

target_include_directories(std.compat SYSTEM PUBLIC @LIBCXX_CONFIGURED_INCLUDE_DIRS@)

if (NOT @LIBCXX_ENABLE_EXCEPTIONS@)
target_compile_options(std.compat PUBLIC -fno-exceptions)
endif()

target_compile_options(std.compat
PUBLIC
-nostdinc++
Expand Down
4 changes: 2 additions & 2 deletions libcxx/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ else()
set(_libcxx_benchmark_mode "no")
endif()

if (NOT LIBCXX_ENABLE_EXCEPTIONS)
if (NOT RUNTIMES_ENABLE_EXCEPTIONS)
serialize_lit_param(SERIALIZED_LIT_PARAMS enable_exceptions False)
endif()

if (NOT LIBCXX_ENABLE_RTTI)
if (NOT RUNTIMES_ENABLE_RTTI)
serialize_lit_param(SERIALIZED_LIT_PARAMS enable_rtti False)
endif()

Expand Down
10 changes: 4 additions & 6 deletions libcxx/utils/ci/run-buildbot
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,7 @@ aarch64)
aarch64-no-exceptions)
clean
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/AArch64.cmake" \
-DLIBCXX_ENABLE_EXCEPTIONS=OFF \
-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF
-DRUNTIMES_ENABLE_EXCEPTIONS=OFF
check-runtimes
;;
# Aka Armv8 32 bit
Expand Down Expand Up @@ -650,10 +649,9 @@ armv7m-picolibc)
armv7m-picolibc-no-exceptions)
test-armv7m-picolibc \
-C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv7M-picolibc.cmake" \
-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF \
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=OFF \
-DLIBCXX_ENABLE_EXCEPTIONS=OFF \
-DLIBCXX_ENABLE_RTTI=OFF
-DRUNTIMES_ENABLE_EXCEPTIONS=OFF \
-DRUNTIMES_ENABLE_RTTI=OFF \
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=OFF
;;
clang-cl-dll)
clean
Expand Down
16 changes: 0 additions & 16 deletions libcxxabi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ include(CMakeDependentOption)
include(HandleCompilerRT)

# Define options.
option(LIBCXXABI_ENABLE_EXCEPTIONS
"Provide support for exceptions in the runtime.
When disabled, libc++abi does not support stack unwinding and other exceptions-related features." ON)
option(LIBCXXABI_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
option(LIBCXXABI_ENABLE_PEDANTIC "Compile with pedantic enabled." OFF)
option(LIBCXXABI_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
Expand Down Expand Up @@ -325,19 +322,6 @@ add_definitions(-D_LIBCPP_BUILDING_LIBRARY)
# Get feature flags.
add_compile_flags_if_supported(-fstrict-aliasing)

# Exceptions
if (LIBCXXABI_ENABLE_EXCEPTIONS)
# Catches C++ exceptions only and tells the compiler to assume that extern C
# functions never throw a C++ exception.
add_compile_flags_if_supported(-EHsc)
# Do we really need to be run through the C compiler ?
add_c_compile_flags_if_supported(-funwind-tables)
else()
add_compile_flags_if_supported(-fno-exceptions)
add_compile_flags_if_supported(-EHs-)
add_compile_flags_if_supported(-EHa-)
endif()

# Assert
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
if (LIBCXXABI_ENABLE_ASSERTIONS)
Expand Down
4 changes: 2 additions & 2 deletions libcxxabi/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
)
endif()

if (LIBCXXABI_ENABLE_EXCEPTIONS)
if (RUNTIMES_ENABLE_EXCEPTIONS)
list(APPEND LIBCXXABI_SOURCES
cxa_exception.cpp
cxa_personality.cpp
Expand Down Expand Up @@ -258,7 +258,7 @@ endif()
# whether the exception runtime machinery is provided.
reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/std-exceptions.exp")

if (LIBCXXABI_ENABLE_EXCEPTIONS)
if (RUNTIMES_ENABLE_EXCEPTIONS)
reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/itanium-exceptions.exp")

if ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "^(armv6|armv7|armv7s)$")
Expand Down
2 changes: 1 addition & 1 deletion libcxxabi/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ set(SERIALIZED_LIT_PARAMS "# Lit parameters serialized here for llvm-lit to pick

serialize_lit_string_param(SERIALIZED_LIT_PARAMS compiler "${CMAKE_CXX_COMPILER}")

if (NOT LIBCXXABI_ENABLE_EXCEPTIONS)
if (NOT RUNTIMES_ENABLE_EXCEPTIONS)
serialize_lit_param(SERIALIZED_LIT_PARAMS enable_exceptions False)
endif()

Expand Down
3 changes: 3 additions & 0 deletions runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_CURRENT_SOURCE_DIR}/../llvm/cmake/modules"
)

# Include options to configure the runtime projects
include(cmake/Modules/LanguageFlags.cmake)

# We order libraries to mirror roughly how they are layered, except that compiler-rt can depend
# on libc++, so we put it after.
set(LLVM_DEFAULT_RUNTIMES "libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;libclc;openmp;offload")
Expand Down
6 changes: 6 additions & 0 deletions runtimes/cmake/Modules/HandleFlags.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# This file defines legacy functions to detect and set compiler flags
# used throughout the runtimes. Please move away from using these
# functions in favour of using interface targets (see for example
# LanguageFlags.cmake).
#

include(CheckCXXCompilerFlag)

Expand Down
Loading
Loading