Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e07a19bc authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Gerrit Code Review
Browse files

Merge "cc_cmake_snapshot: fix cc_test and cc_benchmark" into main

parents ef002477 6e2b8c02
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -489,16 +489,23 @@ func getModuleType(m *Module) string {
		return "library"
	case *testBinary:
		return "executable"
	case *benchmarkDecorator:
		return "executable"
	}
	panic(fmt.Sprintf("Unexpected module type: %T", m.compiler))
	panic(fmt.Sprintf("Unexpected module type: %T", m.linker))
}

func getExtraLibs(m *Module) []string {
	switch decorator := m.linker.(type) {
	case *testBinary:
		if decorator.testDecorator.gtest() {
			return []string{"libgtest"}
			return []string{
				"libgtest",
				"libgtest_main",
			}
		}
	case *benchmarkDecorator:
		return []string{"libgoogle-benchmark"}
	}
	return nil
}