Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions arm-software/embedded/arm-multilib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,12 @@ foreach(lib_idx RANGE ${lib_count_dec})
foreach(flag ${multilib_flags_list})
string(APPEND multilib_yaml_content " - ${flag}\n")
endforeach()
if(ENABLE_MULTILIB_HEADER_OPTIMISATION)
if(ENABLE_MULTILIB_HEADER_OPTIMISATION AND variant_group STREQUAL "base_libs")
string(APPEND multilib_yaml_content " IncludeDirs:\n")
string(APPEND multilib_yaml_content " - ${parent_dir_name}/${variant}/include\n")
string(APPEND multilib_yaml_content " - ${parent_dir_name}/include\n")
endif()
string(APPEND multilib_yaml_content " Group: stdlibs\n")
string(APPEND multilib_yaml_content " Group: ${variant_group}\n")
else()
# In place of a json, an error message is expected.
string(JSON variant_error_msg GET ${lib_def} "error")
Expand All @@ -362,7 +362,7 @@ foreach(lib_idx RANGE ${lib_count_dec})
foreach(flag ${multilib_flags_list})
string(APPEND multilib_yaml_content " - ${flag}\n")
endforeach()
string(APPEND multilib_yaml_content " Group: stdlibs\n")
string(APPEND multilib_yaml_content " Group: base_libs\n")
endif()
endif()

Expand Down
14 changes: 10 additions & 4 deletions arm-software/embedded/arm-multilib/multilib.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@

MultilibVersion: '1.0'

# Make an exclusive group for library variants, to make sure we don't
# accidentally include two or more variants at once.
# Make the main library selection exclusive, to make sure we don't
# accidentally include two or more base variants at once. But allow
# specialised overlay layers such as string/startup deltas to be
# selected in parallel with the base layer.
#
# Even if they all match the command-line options, putting two sets of
# include directories on the include path can cause build failure,
Expand All @@ -32,7 +34,11 @@ MultilibVersion: '1.0'
# nothing will ever include the _libc_ stdio.h, which was what the
# #include_next was really looking for.
Groups:
- Name: stdlibs
- Name: base_libs
Type: Exclusive
- Name: string_libs
Type: Exclusive
- Name: startup_libs
Type: Exclusive

# The list of library variants is substituted in by CMakeLists.txt, so
Expand All @@ -49,7 +55,7 @@ Variants:
- Error: Arm Toolchain for Embedded does not provide RWPI library variants
Flags:
- -frwpi
Group: stdlibs
Group: base_libs

Mappings:

Expand Down