diff options
author | Yifan Hong <elsk@google.com> | 2023-10-16 16:07:37 -0700 |
---|---|---|
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-01-06 17:56:55 +0000 |
commit | 01aece85af33ea8a6aea50c09be185cad146e6b0 (patch) | |
tree | d7abb31d52c104738919e29ef790a983111db146 | |
parent | 1626d0ef633ddf37c0dfb6b73c571778545e4533 (diff) | |
download | build-01aece85af33ea8a6aea50c09be185cad146e6b0.tar.gz |
kleaf: assembly uses .S not .s
Kbuild only accepts .S not .s. Bazel suffix
matching is case-sensitive.
Test: build trusty
Change-Id: I645c226f01bcd577f809c1759b9e71541d876522
-rw-r--r-- | kleaf/impl/ddk/ddk_conditional_filegroup.bzl | 2 | ||||
-rwxr-xr-x | kleaf/impl/ddk/gen_makefiles.py | 8 | ||||
-rw-r--r-- | kleaf/impl/ddk/makefiles.bzl | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/kleaf/impl/ddk/ddk_conditional_filegroup.bzl b/kleaf/impl/ddk/ddk_conditional_filegroup.bzl index 95793f7..d10c5f2 100644 --- a/kleaf/impl/ddk/ddk_conditional_filegroup.bzl +++ b/kleaf/impl/ddk/ddk_conditional_filegroup.bzl @@ -122,7 +122,7 @@ This should be set to `_DDK_CONDITIONAL_TRUE` when `True` is in """, ), "srcs": attr.label_list( - allow_files = [".c", ".h", ".s", ".rs"], + allow_files = [".c", ".h", ".S", ".rs"], doc = "See [`ddk_module.srcs`](#ddk_module-srcs).", ), }, diff --git a/kleaf/impl/ddk/gen_makefiles.py b/kleaf/impl/ddk/gen_makefiles.py index 2b81998..b9700fa 100755 --- a/kleaf/impl/ddk/gen_makefiles.py +++ b/kleaf/impl/ddk/gen_makefiles.py @@ -30,7 +30,7 @@ from typing import Optional, TextIO, Any _SOURCE_SUFFIXES = ( ".c", ".rs", - ".s", + ".S", ) @@ -266,7 +266,7 @@ def _check_srcs_valid(rel_srcs: list[dict[str, Any]], for rel_item in rel_srcs: files = rel_item["files"] rel_srcs_flat.extend( - file for file in files if file.suffix.lower() in _SOURCE_SUFFIXES) + file for file in files if file.suffix in _SOURCE_SUFFIXES) source_files_with_name_of_kernel_module = \ [src for src in rel_srcs_flat if src.with_suffix( @@ -287,9 +287,9 @@ def _handle_src( obj_suffix: str, ): # Ignore non-exported headers specified in srcs - if src.suffix.lower() in (".h",): + if src.suffix in (".h",): return - if src.suffix.lower() not in _SOURCE_SUFFIXES: + if src.suffix not in _SOURCE_SUFFIXES: die("Invalid source %s", src) if not src.is_relative_to(kernel_module_out.parent): die("%s is not a valid source because it is not under %s", diff --git a/kleaf/impl/ddk/makefiles.bzl b/kleaf/impl/ddk/makefiles.bzl index 3a44946..54d3bba 100644 --- a/kleaf/impl/ddk/makefiles.bzl +++ b/kleaf/impl/ddk/makefiles.bzl @@ -312,7 +312,7 @@ makefiles = rule( attrs = { # module_X is the X attribute of the ddk_module. Prefixed with `module_` # because they aren't real srcs / hdrs / deps to the makefiles rule. - "module_srcs": attr.label_list(allow_files = [".c", ".h", ".s", ".rs"]), + "module_srcs": attr.label_list(allow_files = [".c", ".h", ".S", ".rs"]), "module_hdrs": attr.label_list(allow_files = [".h"]), "module_includes": attr.string_list(), "module_linux_includes": attr.string_list(), |