Re-enabled sysroot creation

This commit is contained in:
2021-11-03 16:32:42 +00:00
parent deb5eb6b1b
commit b9160bdff5

View File

@@ -96,6 +96,14 @@ set(photon_libc_include_dirs
set(photon_libc_cflags -ffreestanding -nostdlib -fPIC -fPIE) set(photon_libc_cflags -ffreestanding -nostdlib -fPIC -fPIE)
add_custom_target(photon-prefix
DEPENDS ${photon_libc_headers}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate-sysroot.py
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/prefix
${machine} ${platform})
if (PHOTON_EXPORT_VARS) if (PHOTON_EXPORT_VARS)
set(photon_libc_sources ${photon_libc_sources} PARENT_SCOPE) set(photon_libc_sources ${photon_libc_sources} PARENT_SCOPE)
set(photon_libc_headers ${photon_libc_headers} ${platform_headers} PARENT_SCOPE) set(photon_libc_headers ${photon_libc_headers} ${platform_headers} PARENT_SCOPE)
@@ -124,12 +132,6 @@ endif ()
# ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/${platform_include_dir}) # ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/${platform_include_dir})
# endforeach (platform_include_dir) # endforeach (platform_include_dir)
# #
# add_custom_target(local-root
# DEPENDS ${photon_libc_headers}
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/create-sysroot.sh
# ${CMAKE_CURRENT_SOURCE_DIR}
# ${CMAKE_CURRENT_BINARY_DIR}
# ${platform} ${machine})
# #
# bundle_add_dependencies(photon local-root crt) # bundle_add_dependencies(photon local-root crt)
# #