Static libc++
This commit is contained in:
parent
ec5c430629
commit
cbc38f23b7
1
.clangd
1
.clangd
|
@ -6,3 +6,4 @@ Diagnostics:
|
|||
- module_odr_violation_record
|
||||
- module_odr_violation_template_parameter
|
||||
- fatal_too_many_errors
|
||||
- pch_different_branch
|
||||
|
|
|
@ -6,7 +6,7 @@ FetchContent_Declare(
|
|||
SYSTEM
|
||||
)
|
||||
|
||||
if (NOT std_module_POPULATED)
|
||||
if(NOT std_module_POPULATED)
|
||||
FetchContent_Populate(std_module)
|
||||
endif()
|
||||
|
||||
|
@ -20,51 +20,48 @@ endif()
|
|||
# Adjust project compiler flags
|
||||
#
|
||||
|
||||
|
||||
# target_compile_options(std
|
||||
# PUBLIC
|
||||
# -nostdinc++
|
||||
# PUBLIC
|
||||
# -nostdinc++
|
||||
# )
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-isystem>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:${LIBCXX_INSTALLED_DIR}/include/c++/v1>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:${LIBCXX_INSTALLED_DIR}/include/c++/v1>)
|
||||
|
||||
#
|
||||
# Adjust project linker flags
|
||||
#
|
||||
|
||||
# target_link_options(std
|
||||
# INTERFACE
|
||||
# -nostdlib++
|
||||
# -L${LIBCXX_INSTALLED_DIR}/lib
|
||||
# -Wl,-rpath,${LIBCXX_INSTALLED_DIR}/lib
|
||||
# INTERFACE
|
||||
# -nostdlib++
|
||||
# -L${LIBCXX_INSTALLED_DIR}/lib
|
||||
# -Wl,-rpath,${LIBCXX_INSTALLED_DIR}/lib
|
||||
# )
|
||||
add_link_options($<$<COMPILE_LANGUAGE:CXX>:-nostdlib++>)
|
||||
add_link_options($<$<COMPILE_LANGUAGE:CXX>:-L${LIBCXX_INSTALLED_DIR}/lib>)
|
||||
add_link_options($<$<COMPILE_LANGUAGE:CXX>:-Wl,-rpath,${LIBCXX_INSTALLED_DIR}/lib>)
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Add std static library
|
||||
#
|
||||
|
||||
add_library(std)
|
||||
|
||||
target_sources(std
|
||||
PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES
|
||||
${std_module_SOURCE_DIR}/std.cppm
|
||||
${std_module_SOURCE_DIR}/std.compat.cppm
|
||||
${std_module_SOURCE_DIR}/std.cppm
|
||||
${std_module_SOURCE_DIR}/std.compat.cppm
|
||||
)
|
||||
|
||||
target_compile_options(std
|
||||
PRIVATE
|
||||
-Wno-reserved-module-identifier
|
||||
-Wno-reserved-user-defined-literal
|
||||
-Wno-reserved-module-identifier
|
||||
-Wno-reserved-user-defined-literal
|
||||
)
|
||||
target_link_libraries(std
|
||||
INTERFACE
|
||||
c++
|
||||
link_libraries(
|
||||
libc++.a
|
||||
libc++abi.a
|
||||
libunwind.a
|
||||
)
|
||||
|
||||
#
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
module;
|
||||
#include <boost/predef.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <ctime>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
{
|
||||
bgfx::Init init;
|
||||
init.platformData = pd;
|
||||
init.type = bgfx::RendererType::Agc; // Automatically choose a renderer.
|
||||
init.type = bgfx::RendererType::Count; // Automatically choose a renderer.
|
||||
init.resolution.width = width;
|
||||
init.resolution.height = height;
|
||||
init.resolution.reset = BGFX_RESET_NONE;
|
||||
|
|
Loading…
Reference in New Issue