From dcef0243d58a8cd255f5f86f39d7bed72e7602ed Mon Sep 17 00:00:00 2001 From: Brandon Jones Date: Tue, 8 Aug 2023 08:40:06 +0100 Subject: [PATCH] fix(strict_rules): src is featurable Signed-off-by: Brandon Jones Change-Id: I96aeb3576de622da99ced721553d623c7609e805 --- core/strict_library.go | 2 +- tests/gendiffer/strict_binary/app/build.bp | 3 +++ .../gendiffer/strict_binary/out/linux/build.ninja.out | 11 ++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/strict_library.go b/core/strict_library.go index 3f6f8c76..b6671825 100644 --- a/core/strict_library.go +++ b/core/strict_library.go @@ -21,6 +21,7 @@ func (m *TransitiveLibraryProps) defines() []string { } type StrictLibraryProps struct { + SourceProps Hdrs []string // TODO: Header inclusion //Textual_hdrs []string @@ -52,7 +53,6 @@ type ModuleStrictLibrary struct { module.ModuleBase Properties struct { StrictLibraryProps - SourceProps IncludeProps TransitiveLibraryProps diff --git a/tests/gendiffer/strict_binary/app/build.bp b/tests/gendiffer/strict_binary/app/build.bp index 83cb5513..a539beb6 100644 --- a/tests/gendiffer/strict_binary/app/build.bp +++ b/tests/gendiffer/strict_binary/app/build.bp @@ -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, diff --git a/tests/gendiffer/strict_binary/out/linux/build.ninja.out b/tests/gendiffer/strict_binary/out/linux/build.ninja.out index ea2645db..0126d77b 100644 --- a/tests/gendiffer/strict_binary/out/linux/build.ninja.out +++ b/tests/gendiffer/strict_binary/out/linux/build.ninja.out @@ -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 =