Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
66229b0
Fixing Linux builds
Dandielo Jun 3, 2025
c4a4202
Fixing issues on Windows after changes for linux.#
Dandielo Jun 3, 2025
9c32394
Fixing build issues on HSC tools.
Dandielo Jun 3, 2025
6413b3b
Quick implementation of linux platform layer.
Dandielo Jun 4, 2025
006ca52
Removed hardcoded 'EMSDK_PYTHON' env variable.
Dandielo Jun 4, 2025
f51dfa4
Fixed Android and Webassembly builds.
Dandielo Jun 4, 2025
5307d70
Continued work on Vulkan with Wayland.
Dandielo Jun 5, 2025
580e602
Finished implementing Linux support (tested on WSL)
Dandielo Jun 6, 2025
68d5bc6
Cleared 'Settings' method since the .Environment is now set from IBT …
Dandielo Jun 6, 2025
b328f08
Limit the 'Vulkan-Shader-Compiler' Rule to Windows and Linux targets.
Dandielo Jun 6, 2025
0500042
Fixed deadlock on graph objects. (I knew it was coming)
Dandielo Jun 6, 2025
997ee02
Enable Linux validation.
Dandielo Jun 6, 2025
5cec158
Allow manual dispatching the validation workflow
Dandielo Jun 6, 2025
6a2a454
Cleanup to trigger the workflow.
Dandielo Jun 6, 2025
1e03598
Also install libc++ library for selected clang version
Dandielo Jun 6, 2025
48c37f9
Setup conan default profile
Dandielo Jun 6, 2025
40fc9fe
Use 'pwsh' as shell instead of 'powershell'
Dandielo Jun 6, 2025
3771bbc
Fix compilation error if SDL2 package was not build with support for …
Dandielo Jun 6, 2025
ee7259a
Updated 'rapidjson' package to a patched version.
Dandielo Jun 6, 2025
41e9bfb
Updated 3rdParty license information.
Dandielo Jun 6, 2025
74496ca
Implemeted naming threads on Linux targets.
Dandielo Jun 6, 2025
2b19e54
Updated license headers in all recently changed files.
Dandielo Jun 6, 2025
1dd156d
Fix creation and modification year in license headers.
Dandielo Jun 6, 2025
18c044e
Updated license headers in .bff scripts.
Dandielo Jun 6, 2025
20d4637
Implemented Storage platform API for linux.
Dandielo Jun 7, 2025
49fcf44
Impelemnted missing parts of the Threads palatform API for Linux
Dandielo Jun 7, 2025
85171d0
Implemented 'ice::current_thread::sleep' function.
Dandielo Jun 7, 2025
04ca2f1
Implemeted AIO file writing (more like writing on different threads, …
Dandielo Jun 7, 2025
80aa51e
Update code validation workflow.
Dandielo Jun 7, 2025
99be52c
Fixing build issues after latest Linux changes.
Dandielo Jun 7, 2025
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
2 changes: 1 addition & 1 deletion source/code/core/core/public/ice/assert_core.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(_wassert(_CRT_WIDE(#expression), _CRT_WIDE(__FILE__), (unsigned)(__LINE__)), 0) \
); } } while(false)

#elif ISP_WEBAPP
#elif ISP_WEBAPP || ISP_LINUX

#define ICE_ASSERT_CORE(expression) ((expression) \
? (void)0 \
Expand Down
4 changes: 3 additions & 1 deletion source/code/core/core/public/ice/build/build.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ namespace ice::build

static constexpr bool is_windows = current_platform == System::Windows;

static constexpr bool is_unix = current_platform == System::Unix;
static constexpr bool is_linux = current_platform == System::Linux;

static constexpr bool is_android = current_platform == System::Android;

static constexpr bool is_webapp = current_platform == System::WebApp;

static constexpr bool is_unix = is_linux || is_android || is_webapp;


static constexpr bool is_x64 = current_platform == Architecture::x86_x64 || current_platform == Architecture::Arm64;

Expand Down
29 changes: 13 additions & 16 deletions source/code/core/core/public/ice/build/platform.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace ice::build
UWP,
Windows,
Android,
Unix,
Linux,
WebApp
};

Expand Down Expand Up @@ -109,20 +109,13 @@ namespace ice::build
.compiler = Compiler::Clang
};

static constexpr Platform platform_unix_x64_clang = {
.name = "unix-x64-clang",
.system = System::Unix,
static constexpr Platform platform_linux_x64_clang = {
.name = "linux-x64-clang",
.system = System::Linux,
.architecture = Architecture::x86_x64,
.compiler = Compiler::Clang
};

static constexpr Platform platform_unix_x64_gcc = {
.name = "unix-x64-gcc",
.system = System::Unix,
.architecture = Architecture::x86_x64,
.compiler = Compiler::GCC
};

static constexpr Platform platform_webapp_webasm32_clang = {
.name = "webapp-webasm32-clang",
.system = System::WebApp,
Expand All @@ -136,8 +129,7 @@ namespace ice::build
platform_windows_x64_clang,
platform_android_arm64_clang,
platform_android_x64_clang,
platform_unix_x64_clang,
platform_unix_x64_gcc,
platform_linux_x64_clang,
platform_webapp_webasm32_clang
};

Expand All @@ -152,6 +144,7 @@ namespace ice::build

#if defined(_WIN64)
# define ISP_UNIX 0
# define ISP_LINUX 0
# define ISP_WINDOWS 1
# define ISP_ANDROID 0
# define ISP_WEBAPP 0
Expand All @@ -173,6 +166,7 @@ namespace ice::build
# define ISP_ARCHFAM_WEBASM 0
#elif defined(__ANDROID__)
# define ISP_UNIX 1
# define ISP_LINUX 0
# define ISP_WINDOWS 0
# define ISP_ANDROID __ANDROID_API__
# define ISP_WEBAPP 0
Expand All @@ -193,6 +187,7 @@ namespace ice::build
# endif
#elif defined(EMSCRIPTEN)
# define ISP_UNIX 1
# define ISP_LINUX 0
# define ISP_WINDOWS 0
# define ISP_ANDROID 0
# define ISP_WEBAPP 1
Expand All @@ -207,6 +202,7 @@ namespace ice::build
static constexpr Platform current_platform = platform_webapp_webasm32_clang;
#elif __unix__ && !__clang__
# define ISP_UNIX 1
# define ISP_LINUX 1
# define ISP_WINDOWS 0
# define ISP_ANDROID 0
# define ISP_WEBAPP 0
Expand All @@ -220,6 +216,7 @@ namespace ice::build
static constexpr Platform current_platform = platform_unix_x64_gcc;
#elif __unix__ && __clang__
# define ISP_UNIX 1
# define ISP_LINUX 1
# define ISP_WINDOWS 0
# define ISP_ANDROID 0
# define ISP_WEBAPP 0
Expand All @@ -230,7 +227,7 @@ namespace ice::build
# define ISP_ARCHFAM_ARM 0
# define ISP_ARCHFAM_WEBASM 0

static constexpr Platform current_platform = platform_unix_x64_clang;
static constexpr Platform current_platform = platform_linux_x64_clang;
#else
# define ISP_UNIX 0
# define ISP_WINDOWS 0
Expand Down Expand Up @@ -321,8 +318,8 @@ namespace ice::build
return "windows";
case ice::build::System::Android:
return "android";
case ice::build::System::Unix:
return "unix";
case ice::build::System::Linux:
return "linux";
default:
return "<invalid>";
}
Expand Down
2 changes: 1 addition & 1 deletion source/code/core/modules/private/module_globals.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extern "C"

} // extern "C"

#elif ISP_ANDROID
#elif ISP_ANDROID || ISP_LINUX

extern "C"
{
Expand Down
36 changes: 16 additions & 20 deletions source/code/core/utils/private/assert.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
namespace ice::detail
{

static constexpr ice::String LogFormat_AssertLineHeader = "{:%T} [ASRT] ASSERT";
static constexpr ice::String LogFormat_AssertCondition = "{}({}) : {} > Assertion failed! `{}`\n";
static constexpr ice::String LogFormat_AssertMessage = "{}({}) : {} | ";
static constexpr fmt::string_view LogFormat_AssertLineHeader = "{:%T} [ASRT] ASSERT";
static constexpr fmt::string_view LogFormat_AssertCondition = "{}({}) : {} > Assertion failed! `{}`\n";
static constexpr fmt::string_view LogFormat_AssertMessage = "{}({}) : {} | ";

void assert(
ice::String condition,
Expand Down Expand Up @@ -55,7 +55,7 @@ namespace ice::detail
fmt::format_to_n_result format_result = fmt::format_to_n(
header_buffer_raw,
128,
fmt_string(LogFormat_AssertLineHeader),
LogFormat_AssertLineHeader,
fmt::localtime(std::time(nullptr))
);

Expand All @@ -69,25 +69,21 @@ namespace ice::detail
static ice::HostAllocator host_alloc{};
detail::LogMessageBuffer final_buffer{ host_alloc, 3000 };

fmt::vformat_to(
fmt::format_to(
std::back_inserter(final_buffer),
fmt_string(LogFormat_AssertCondition),
fmt::make_format_args(
fmt_string(location.file),
location.line,
log_header,
fmt_string(condition)
)
LogFormat_AssertCondition,
location.file,
location.line,
log_header,
condition
);

fmt::vformat_to(
fmt::format_to(
std::back_inserter(final_buffer),
fmt_string(LogFormat_AssertMessage),
fmt::make_format_args(
fmt_string(location.file),
location.line,
log_header
)
LogFormat_AssertMessage,
fmt_string(location.file),
location.line,
log_header
);

fmt::vformat_to(
Expand Down Expand Up @@ -118,7 +114,7 @@ namespace ice::detail
ice::detail::LogLocation location
) noexcept
{
fmt::vprint(
fmt::vprintln(
stderr,
fmt_string(message),
ice::move(args)
Expand Down
7 changes: 6 additions & 1 deletion source/code/core/utils/private/log_buffer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
namespace ice::detail
{

void internal_grow_fmt_buffer(fmt::detail::buffer<char>& buf, size_t capacity) noexcept
{
static_cast<LogMessageBuffer&>(buf).grow(capacity);
}

LogMessageBuffer::LogMessageBuffer(ice::Allocator& alloc, ice::ucount initial_allocation) noexcept
: fmt::detail::buffer<char>{ }
: fmt::detail::buffer<char>{ internal_grow_fmt_buffer }
, _allocator{ alloc }
{
this->set(
Expand Down
4 changes: 2 additions & 2 deletions source/code/core/utils/private/log_buffer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
namespace ice::detail
{

class LogMessageBuffer final : public fmt::v10::detail::buffer<char>
class LogMessageBuffer final : public fmt::v11::detail::buffer<char>
{
public:
LogMessageBuffer(ice::Allocator& alloc, ice::ucount initial_allocation) noexcept;
~LogMessageBuffer() noexcept;

void grow(size_t size) noexcept override;
void grow(size_t size) noexcept;

private:
ice::Allocator& _allocator;
Expand Down
2 changes: 1 addition & 1 deletion source/code/core/utils/private/native_aio.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ namespace ice::native_aio
request->_callback(result, read_size, request->_userdata);
}
}
#elif ISP_WEBAPP || ISP_ANDROID
#elif ISP_WEBAPP || ISP_ANDROID || ISP_LINUX
auto aio_open(
ice::Allocator& alloc,
ice::native_aio::AIOPortInfo const& info
Expand Down
2 changes: 1 addition & 1 deletion source/code/core/utils/private/native_aio.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace ice::native_aio
HANDLE _completion_port;
ice::u32 _worker_limit;
};
#elif ISP_ANDROID || ISP_WEBAPP
#elif ISP_ANDROID || ISP_WEBAPP || ISP_LINUX
struct AIORequestInternal
{
AIORequestInternal* next;
Expand Down
68 changes: 50 additions & 18 deletions source/code/core/utils/private/native_file.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -537,13 +537,7 @@ namespace ice::native_file
) noexcept -> ice::native_file::File
{
ice::native_file::File result;
if constexpr (ice::build::current_platform == ice::build::System::Android)
{
result = ice::native_file::File{
open(ice::string::begin(path), translate_flags(flags))
};
}
else if constexpr (ice::build::current_platform == ice::build::System::WebApp)
if constexpr (ice::build::is_unix)
{
result = ice::native_file::File{
open(ice::string::begin(path), translate_flags(flags))
Expand Down Expand Up @@ -597,17 +591,6 @@ namespace ice::native_file
return read_file(native_file, 0_B, requested_read_size, memory);
}

auto read_file_request(
ice::native_aio::AIORequest& request,
ice::native_file::File const& native_file,
ice::usize requested_read_offset,
ice::usize requested_read_size,
ice::Memory memory
) noexcept -> ice::native_file::FileRequestStatus
{
return aio_file_read_request(request, native_file, requested_read_offset, requested_read_size, memory);
}

auto read_file(
ice::native_file::File const& native_file,
ice::usize requested_read_offset,
Expand All @@ -630,6 +613,47 @@ namespace ice::native_file
return { static_cast<ice::usize::base_type>(bytes_read) };
}

auto read_file_request(
ice::native_aio::AIORequest& request,
ice::native_file::File const& native_file,
ice::usize requested_read_offset,
ice::usize requested_read_size,
ice::Memory memory
) noexcept -> ice::native_file::FileRequestStatus
{
return aio_file_read_request(request, native_file, requested_read_offset, requested_read_size, memory);
}

auto write_file(
ice::native_file::File const& native_file,
ice::usize write_offset,
ice::Data data
) noexcept -> ice::usize
{
ICE_ASSERT(false, "Missing implementation!");
return 0_B;
}

auto write_file_request(
ice::native_aio::AIORequest& request,
ice::native_file::File const& native_file,
ice::usize write_offset,
ice::Data data
) noexcept -> ice::native_file::FileRequestStatus
{
ICE_ASSERT(false, "Missing implementation!");
return FileRequestStatus::Error;
}

auto append_file(
ice::native_file::File const& native_file,
ice::Data data
) noexcept -> ice::usize
{
ICE_ASSERT(false, "Missing implementation!");
return 0_B;
}

bool traverse_directories_internal(
ice::native_file::FilePath basepath,
ice::native_file::HeapFilePath& dirpath,
Expand Down Expand Up @@ -714,6 +738,14 @@ namespace ice::native_file
return traverse_directories_internal(dirpath, dirpath, callback, userdata);
}

bool create_directory(
ice::native_file::FilePath path
) noexcept
{
ICE_ASSERT(false, "Missing implementation!");
return false;
}

void path_from_string(
ice::native_file::HeapFilePath& out_filepath,
ice::String path_string
Expand Down
2 changes: 1 addition & 1 deletion source/code/core/utils/public/ice/assert.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace ice::detail
ice::detail::assert( \
#condition, \
message, \
fmt::make_format_args(__VA_ARGS__), \
ice::detail::log_make_args(__VA_ARGS__), \
ice::detail::LogLocation{ .file = __FILE__, .line = __LINE__ } \
); \
ice::detail::terminate(); \
Expand Down
15 changes: 13 additions & 2 deletions source/code/core/utils/public/ice/log.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ namespace ice::detail
ice::detail::LogLocation location
) noexcept;

constexpr auto log_make_args() noexcept
{
return fmt::make_format_args();
}

template<typename... Args>
constexpr auto log_make_args(Args&&... args) noexcept
{
return fmt::make_format_args(args...);
}

} // namespace ice::detail

#if defined ICE_LOG
Expand All @@ -39,7 +50,7 @@ namespace ice::detail
severity, \
ice::detail::get_tag(tag), \
format, \
fmt::make_format_args(__VA_ARGS__), \
ice::detail::log_make_args(__VA_ARGS__), \
ice::detail::LogLocation{ .file = __FILE__, .line = __LINE__ } \
); \
} \
Expand All @@ -55,7 +66,7 @@ namespace ice::detail
severity, \
ice::detail::get_tag(tag), \
format, \
fmt::make_format_args(__VA_ARGS__), \
ice::detail::log_make_args(__VA_ARGS__), \
ice::detail::LogLocation{ .file = __FILE__, .line = __LINE__ } \
); \
} \
Expand Down
Loading
Loading