kernel: Add a customizable configuration file system
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b7bdec9ece
commit
04322d9ff7
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ initrd/bin/**
|
||||
initrd/tests/**
|
||||
base/
|
||||
.fakeroot
|
||||
kernel/config.cmake
|
||||
|
@ -103,6 +103,10 @@ if(MOON_DEBUG)
|
||||
include(debug.cmake)
|
||||
endif()
|
||||
|
||||
if(EXISTS config.cmake)
|
||||
include(config.cmake)
|
||||
endif()
|
||||
|
||||
target_link_options(moon PRIVATE -lgcc -Wl,--build-id=none -z max-page-size=0x1000 -mcmodel=kernel)
|
||||
|
||||
set_target_properties(moon PROPERTIES CXX_STANDARD 20)
|
||||
|
12
kernel/config.cmake.template
Normal file
12
kernel/config.cmake.template
Normal file
@ -0,0 +1,12 @@
|
||||
# Copy this file and rename it to 'config.cmake' before making your own changes.
|
||||
|
||||
# config.cmake: Configuration file for the kernel.
|
||||
# Edit/add values to customize kernel compilation flags/defines.
|
||||
# This file is automatically ignored by git.
|
||||
# To use an example configuration line, just remove the hashtag '#' at the beginning.
|
||||
|
||||
# Example: Adding a compiler definition. This will define PCI_DEBUG in the kernel source.
|
||||
# target_compile_definitions(moon PRIVATE PCI_DEBUG)
|
||||
|
||||
# Example: Adding a compiler flag. This will optimize the kernel aggressively (warning: untested, use at your own discretion).
|
||||
# target_compile_options(moon PRIVATE -O3)
|
Loading…
Reference in New Issue
Block a user