Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ def _module_map_struct_to_module_map_content(parameters, tree_expander):
add_header(path = header.path, visibility = "", can_compile = True)
added_paths.add(header.path)

for header in expanded(parameters.textual_headers):
if header.path in added_paths:
continue
add_header(path = header.path, visibility = "", can_compile = False)
added_paths.add(header.path)

for header in expanded(parameters.private_headers):
if header.path in added_paths:
continue
Expand Down Expand Up @@ -278,6 +284,7 @@ def _create_module_map_action(
module_map,
private_headers,
public_headers,
textual_headers,
dependency_module_maps,
additional_exported_headers,
separate_module_headers,
Expand All @@ -292,6 +299,7 @@ def _create_module_map_action(
data_struct = struct(
module_map = module_map,
public_headers = public_headers,
textual_headers = textual_headers,
private_headers = private_headers,
dependency_module_maps = dependency_module_maps,
additional_exported_headers = additional_exported_headers,
Expand All @@ -309,6 +317,7 @@ def _create_module_map_action(
# simple null function.
tree_artifacts = [h for h in private_headers if h.is_directory]
tree_artifacts += [h for h in public_headers if h.is_directory]
tree_artifacts += [h for h in textual_headers if h.is_directory]
content.add_all(tree_artifacts, map_each = lambda x: None, allow_closure = True)

actions.write(module_map.file(), content = content, is_executable = True)
Expand Down Expand Up @@ -472,8 +481,10 @@ def _init_cc_compilation_context(

if _enabled(feature_configuration, "only_doth_headers_in_module_maps"):
public_headers_for_module_map_action = [header for header in public_headers.module_map_headers if (header.is_directory or header.extension == "h")]
textual_headers_for_module_map_action = [header for header in textual_headers.module_map_headers if (header.is_directory or header.extension == "h")]
else:
public_headers_for_module_map_action = public_headers.module_map_headers
textual_headers_for_module_map_action = textual_headers.module_map_headers

private_headers_for_module_map_action = private_headers_artifacts
if _enabled(feature_configuration, "exclude_private_headers_in_module_maps"):
Expand All @@ -483,6 +494,7 @@ def _init_cc_compilation_context(
actions = actions,
module_map = module_map,
public_headers = public_headers_for_module_map_action,
textual_headers = textual_headers_for_module_map_action,
separate_module_headers = separate_public_headers.module_map_headers,
dependency_module_maps = dependency_module_maps,
private_headers = private_headers_for_module_map_action,
Expand Down
Loading