Compare commits
7 Commits
99959dbefc
...
Developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| 43fceadaac | |||
| 103610550a | |||
| 06700d29fb | |||
| 5dea03650d | |||
| fb870a5028 | |||
| 41c7a31b62 | |||
| 15d5da0401 |
@@ -64,7 +64,7 @@ jobs:
|
|||||||
--version=${{ matrix.package.version }} \
|
--version=${{ matrix.package.version }} \
|
||||||
--user=bigfootdev \
|
--user=bigfootdev \
|
||||||
--channel=${{ env.BRANCH_NAME }} \
|
--channel=${{ env.BRANCH_NAME }} \
|
||||||
-pr:b=clang -pr:h=clang \
|
-pr:b=./ConanProfiles/clang -pr:h=./ConanProfiles/clang \
|
||||||
--build=missing --remote=bigfootpackages
|
--build=missing --remote=bigfootpackages
|
||||||
|
|
||||||
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
||||||
|
|||||||
26
ConanProfiles/clang
Normal file
26
ConanProfiles/clang
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
[settings]
|
||||||
|
os=Linux
|
||||||
|
arch=x86_64
|
||||||
|
compiler=clang
|
||||||
|
compiler.version=20
|
||||||
|
compiler.libcxx=libstdc++11
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.cstd=17
|
||||||
|
build_type=Release
|
||||||
|
[conf]
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-ffast-math;-fno-exceptions;-fno-rtti', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-ffast-math', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:generator=Ninja
|
||||||
|
tools.system.package_manager:mode=install
|
||||||
|
tools.system.package_manager:sudo=True
|
||||||
|
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
||||||
|
|
||||||
|
tools.build:exelinkflags=["-fuse-ld=mold", "-flto"]
|
||||||
|
tools.build:sharedlinkflags=["-fuse-ld=mold", "-flto"]
|
||||||
|
|
||||||
|
tools.build:cflags=["-flto"]
|
||||||
|
tools.build:cxxflags=["-flto"]
|
||||||
|
|
||||||
|
[tool_requires]
|
||||||
|
!cmake/*: cmake/[>=4.2]
|
||||||
25
ConanProfiles/clang_coverage
Normal file
25
ConanProfiles/clang_coverage
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
[settings]
|
||||||
|
os=Linux
|
||||||
|
arch=x86_64
|
||||||
|
compiler=clang
|
||||||
|
compiler.version=20
|
||||||
|
compiler.libcxx=libstdc++11
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.cstd=17
|
||||||
|
build_type=Debug
|
||||||
|
[conf]
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fno-exceptions;-fno-rtti;-fprofile-instr-generate;-fcoverage-mapping', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fprofile-instr-generate;-fcoverage-mapping', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_SHARED_LINK_FLAGS': {'value': '-fprofile-instr-generate', 'cache': True, 'type': 'STRING', 'docstring': 'SHARED link flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_EXE_LINK_FLAGS': {'value': '-fprofile-instr-generate', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:generator=Ninja
|
||||||
|
tools.system.package_manager:mode=install
|
||||||
|
tools.system.package_manager:sudo=True
|
||||||
|
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
||||||
|
|
||||||
|
tools.build:exelinkflags=["-fuse-ld=mold"]
|
||||||
|
tools.build:sharedlinkflags=["-fuse-ld=mold"]
|
||||||
|
|
||||||
|
[tool_requires]
|
||||||
|
!cmake/*: cmake/[>=4.2]
|
||||||
23
ConanProfiles/clangd
Normal file
23
ConanProfiles/clangd
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
[settings]
|
||||||
|
os=Linux
|
||||||
|
arch=x86_64
|
||||||
|
compiler=clang
|
||||||
|
compiler.version=20
|
||||||
|
compiler.libcxx=libstdc++11
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.cstd=17
|
||||||
|
build_type=Debug
|
||||||
|
[conf]
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-ffast-math;-fno-exceptions;-fno-rtti', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-ffast-math', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:generator=Ninja
|
||||||
|
tools.system.package_manager:mode=install
|
||||||
|
tools.system.package_manager:sudo=True
|
||||||
|
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
||||||
|
|
||||||
|
tools.build:exelinkflags=["-fuse-ld=mold"]
|
||||||
|
tools.build:sharedlinkflags=["-fuse-ld=mold"]
|
||||||
|
|
||||||
|
[tool_requires]
|
||||||
|
!cmake/*: cmake/[>=4.2]
|
||||||
22
ConanProfiles/msvc
Normal file
22
ConanProfiles/msvc
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
[settings]
|
||||||
|
os=Windows
|
||||||
|
arch=x86_64
|
||||||
|
compiler=msvc
|
||||||
|
compiler.version=195
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.cstd=17
|
||||||
|
compiler.runtime=dynamic
|
||||||
|
build_type=Release
|
||||||
|
[conf]
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables={'BIGFOOT_CXX_FLAGS': {'value': '/W4;/WX;/EHs-;/D_HAS_EXCEPTIONS=0;/GR-;/fp:fast', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '/W4;/WX;/fp:fast', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
|
||||||
|
|
||||||
|
tools.build:exelinkflags=["/LTCG", "/INCREMENTAL:NO"]
|
||||||
|
tools.build:sharedlinkflags=["/LTCG", "/INCREMENTAL:NO"]
|
||||||
|
|
||||||
|
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/GL"]
|
||||||
|
tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/GL"]
|
||||||
|
|
||||||
|
[tool_requires]
|
||||||
|
!cmake/*: cmake/[>=4.2]
|
||||||
19
ConanProfiles/msvc_ccache.cmake
Normal file
19
ConanProfiles/msvc_ccache.cmake
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# https://github.com/ccache/ccache/wiki/MS-Visual-Studio#usage-with-cmake
|
||||||
|
|
||||||
|
find_program(ccache_exe ccache)
|
||||||
|
if(ccache_exe)
|
||||||
|
file(COPY_FILE
|
||||||
|
${ccache_exe} ${CMAKE_BINARY_DIR}/cl.exe
|
||||||
|
ONLY_IF_DIFFERENT)
|
||||||
|
|
||||||
|
# By default Visual Studio generators will use /Zi which is not compatible
|
||||||
|
# with ccache, so tell Visual Studio to use /Z7 instead.
|
||||||
|
message(STATUS "Setting MSVC debug information format to 'Embedded'")
|
||||||
|
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
|
||||||
|
|
||||||
|
set(CMAKE_VS_GLOBALS
|
||||||
|
"CLToolExe=cl.exe"
|
||||||
|
"CLToolPath=${CMAKE_BINARY_DIR}"
|
||||||
|
"UseMultiToolTask=true"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
19
ConanProfiles/msvcd
Normal file
19
ConanProfiles/msvcd
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[settings]
|
||||||
|
os=Windows
|
||||||
|
arch=x86_64
|
||||||
|
compiler=msvc
|
||||||
|
compiler.version=195
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.cstd=17
|
||||||
|
compiler.runtime=dynamic
|
||||||
|
build_type=Debug
|
||||||
|
[conf]
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables={'BIGFOOT_CXX_FLAGS': {'value': '/W4;/WX;/EHs-;/D_HAS_EXCEPTIONS=0;/GR-;/fp:fast', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '/W4;/WX;/fp:fast', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||||
|
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
|
||||||
|
|
||||||
|
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
|
||||||
|
tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary"]
|
||||||
|
|
||||||
|
[tool_requires]
|
||||||
|
!cmake/*: cmake/[>=4.2]
|
||||||
@@ -29,6 +29,7 @@ class MimallocConan(ConanFile):
|
|||||||
"single_object": [True, False],
|
"single_object": [True, False],
|
||||||
"guarded": [True, False],
|
"guarded": [True, False],
|
||||||
"win_redirect": [True, False],
|
"win_redirect": [True, False],
|
||||||
|
"asan": [True, False],
|
||||||
}
|
}
|
||||||
default_options = {
|
default_options = {
|
||||||
"shared": False,
|
"shared": False,
|
||||||
@@ -39,6 +40,7 @@ class MimallocConan(ConanFile):
|
|||||||
"single_object": False,
|
"single_object": False,
|
||||||
"guarded": False,
|
"guarded": False,
|
||||||
"win_redirect": False,
|
"win_redirect": False,
|
||||||
|
"asan": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
def export_sources(self):
|
def export_sources(self):
|
||||||
@@ -91,6 +93,11 @@ class MimallocConan(ConanFile):
|
|||||||
raise ConanInvalidConfiguration(
|
raise ConanInvalidConfiguration(
|
||||||
f"Currently, {self.ref} doesn't work properly with shared MD builds in CCI. Contributions welcomed")
|
f"Currently, {self.ref} doesn't work properly with shared MD builds in CCI. Contributions welcomed")
|
||||||
|
|
||||||
|
if self.options.override and \
|
||||||
|
self.options.asan:
|
||||||
|
raise ConanInvalidConfiguration(
|
||||||
|
"Asan requires Mimalloc to be compiled without override")
|
||||||
|
|
||||||
# Shared overriding requires dynamic runtime for MSVC:
|
# Shared overriding requires dynamic runtime for MSVC:
|
||||||
if self.options.override and \
|
if self.options.override and \
|
||||||
self.options.shared and \
|
self.options.shared and \
|
||||||
@@ -129,6 +136,7 @@ class MimallocConan(ConanFile):
|
|||||||
tc.variables["MI_WIN_REDIRECT"] = "ON" if self.options.get_safe("win_redirect") else "OFF"
|
tc.variables["MI_WIN_REDIRECT"] = "ON" if self.options.get_safe("win_redirect") else "OFF"
|
||||||
tc.variables["MI_INSTALL_TOPLEVEL"] = "ON"
|
tc.variables["MI_INSTALL_TOPLEVEL"] = "ON"
|
||||||
tc.variables["MI_GUARDED"] = self.options.get_safe("guarded", False)
|
tc.variables["MI_GUARDED"] = self.options.get_safe("guarded", False)
|
||||||
|
tc.variables["MI_TRACK_ASAN"] = "ON" if self.options.get_safe("asan") else "OFF"
|
||||||
if Version(self.version) <= "1.7.6":
|
if Version(self.version) <= "1.7.6":
|
||||||
tc.cache_variables["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" # CMake 4 support
|
tc.cache_variables["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" # CMake 4 support
|
||||||
tc.generate()
|
tc.generate()
|
||||||
@@ -211,6 +219,10 @@ class MimallocConan(ConanFile):
|
|||||||
return os.path.join(self.package_folder, "lib", "cmake")
|
return os.path.join(self.package_folder, "lib", "cmake")
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
|
if(self.options.asan):
|
||||||
|
self.cpp_info.set_property("cmake_file_name", "mimalloc-asan")
|
||||||
|
self.cpp_info.set_property("cmake_target_name", "mimalloc-asan")
|
||||||
|
else:
|
||||||
self.cpp_info.set_property("cmake_file_name", "mimalloc")
|
self.cpp_info.set_property("cmake_file_name", "mimalloc")
|
||||||
self.cpp_info.set_property("cmake_target_name", "mimalloc" if self.options.shared else "mimalloc-static")
|
self.cpp_info.set_property("cmake_target_name", "mimalloc" if self.options.shared else "mimalloc-static")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user