Skip to content

Commit

Permalink
fix(strict_rules): src is featurable
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Jones <brandon.jones@arm.com>
Change-Id: I96aeb3576de622da99ced721553d623c7609e805
  • Loading branch information
BrandonThomasJonesARM authored and lukokr-aarch64 committed Aug 9, 2023
1 parent 0e64602 commit dcef024
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/strict_library.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func (m *TransitiveLibraryProps) defines() []string {
}

type StrictLibraryProps struct {
SourceProps
Hdrs []string
// TODO: Header inclusion
//Textual_hdrs []string
Expand Down Expand Up @@ -52,7 +53,6 @@ type ModuleStrictLibrary struct {
module.ModuleBase
Properties struct {
StrictLibraryProps
SourceProps
IncludeProps
TransitiveLibraryProps

Expand Down
3 changes: 3 additions & 0 deletions tests/gendiffer/strict_binary/app/build.bp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ bob_executable {
bob_executable {
name: "simple_bob_executable_target",
srcs: ["src.cpp"],
linux: {
srcs: ["linuxsrc.cpp"],
},
host_supported: false,
target_supported: true,
build_by_default: true,
Expand Down
11 changes: 10 additions & 1 deletion tests/gendiffer/strict_binary/out/linux/build.ninja.out
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,18 @@ build ${g.bob.BuildDir}/target/objects/simple_bob_executable_target/src.cpp.o: $
cxxcompiler = g++
cxxflags = ${m.simple_bob_executable_target_target.cxxflags}

build $
${g.bob.BuildDir}/target/objects/simple_bob_executable_target/linuxsrc.cpp.o $
: g.bob.cxx ${g.bob.SrcDir}/linuxsrc.cpp
build_wrapper =
cflags = ${m.simple_bob_executable_target_target.cflags}
cxxcompiler = g++
cxxflags = ${m.simple_bob_executable_target_target.cxxflags}

build ${g.bob.BuildDir}/target/executable/simple_bob_executable_target: $
g.bob.executable $
${g.bob.BuildDir}/target/objects/simple_bob_executable_target/src.cpp.o
${g.bob.BuildDir}/target/objects/simple_bob_executable_target/src.cpp.o $
${g.bob.BuildDir}/target/objects/simple_bob_executable_target/linuxsrc.cpp.o
build_wrapper =
ldflags = -Wl,--as-needed
ldlibs =
Expand Down

0 comments on commit dcef024

Please sign in to comment.