Skip to content

Commit

Permalink
elfloader: Only include driver source on arm
Browse files Browse the repository at this point in the history
RISC-V platforms don't use any extension drivers currently so it's not
useful to compile and link them in when not building for arm.

Signed-off-by: Kent McLeod <kent@kry10.com>
  • Loading branch information
kent-mcleod committed Feb 15, 2024
1 parent 549fc2a commit 9449166
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions elfloader-tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,22 @@ elseif(KernelSel4ArchAarch32)
add_compile_options(-mno-unaligned-access)
endif()

file(
GLOB
files
src/*.c
if(KernelArchARM)
# Only the Arm arch uses extension drivers.
set(
driver_file_globs
src/drivers/*.c
src/drivers/smp/*.c
src/drivers/uart/*.c
src/drivers/timer/*.c
)
endif()

file(
GLOB
files
src/*.c
${driver_file_globs}
src/utils/*.c
src/arch-${KernelArch}/*.c
src/arch-${KernelArch}/*.S
Expand Down

0 comments on commit 9449166

Please sign in to comment.