From deb5eb6b1bf720c89a621235d2732a454550e35c Mon Sep 17 00:00:00 2001 From: Max Wash Date: Thu, 26 Aug 2021 13:29:09 +0100 Subject: [PATCH] Sysroot headers can now be built without the build system --- CMakeLists.txt | 2 ++ scripts/generate-sysroot.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a60181b..418ef9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,8 @@ add_custom_target(crt ALL DEPENDS ${crt_bin} COMMENT "Generating CRT files") +set(photon_libc_crt_bin ${crt_bin} PARENT_SCOPE) + file(GLOB platform_sources ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/machine/${machine}/*.c diff --git a/scripts/generate-sysroot.py b/scripts/generate-sysroot.py index 20a0c29..cced919 100755 --- a/scripts/generate-sysroot.py +++ b/scripts/generate-sysroot.py @@ -34,7 +34,9 @@ def mkdir_p(path): source_dir = sys.argv[1] bin_dir = sys.argv[2] sysroot_dir = sys.argv[3] -(machine, platform) = get_platform(bin_dir) +# (machine, platform) = get_platform(bin_dir) +machine = sys.argv[4] +platform = sys.argv[5] base_headers_path = '{}/photon/libc/include'.format(source_dir) platform_headers_path = '{}/photon/libc/sys/{}'.format(source_dir, platform)