userspace: fix aoc2023 and aoc2024 linking

This patch makes aoc projects not link against system libc but the cmake
libc target. This allows compilation before libc is installed
This commit is contained in:
Bananymous 2024-12-02 03:44:18 +02:00
parent 747c3b2a4b
commit d2b503910f
2 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,9 @@ endforeach()
foreach(AOC2023_PROJECT ${AOC2023_PROJECTS})
add_subdirectory(${AOC2023_PROJECT})
add_dependencies(aoc2023 aoc2023_${AOC2023_PROJECT})
target_link_options(aoc2023_${AOC2023_PROJECT} PRIVATE -nolibc)
target_compile_options(aoc2023_${AOC2023_PROJECT} PRIVATE -g -O2 -Wall -Wextra -Werror)
endforeach()
add_dependencies(userspace aoc2023)

View File

@ -19,6 +19,9 @@ endforeach()
foreach(AOC2024_PROJECT ${AOC2024_PROJECTS})
add_subdirectory(${AOC2024_PROJECT})
add_dependencies(aoc2024 aoc2024_${AOC2024_PROJECT})
target_link_options(aoc2024_${AOC2024_PROJECT} PRIVATE -nolibc)
target_compile_options(aoc2024_${AOC2024_PROJECT} PRIVATE -g -O2 -Wall -Wextra -Werror)
endforeach()
add_dependencies(userspace aoc2024)