Don't use GTEST_OS_LINUX on Darwin
Change-Id: If77118591daa7b474e6989e03109ea32ddd357b2
This commit is contained in:
parent
8146b2f1c9
commit
4a94683a60
1 changed files with 6 additions and 2 deletions
8
cc/cc.go
8
cc/cc.go
|
@ -2051,11 +2051,15 @@ func (test *testLinker) flags(ctx ModuleContext, flags Flags) Flags {
|
|||
if ctx.Host() {
|
||||
flags.CFlags = append(flags.CFlags, "-O0", "-g")
|
||||
|
||||
if ctx.HostType() == common.Windows {
|
||||
switch ctx.HostType() {
|
||||
case common.Windows:
|
||||
flags.CFlags = append(flags.CFlags, "-DGTEST_OS_WINDOWS")
|
||||
} else {
|
||||
case common.Linux:
|
||||
flags.CFlags = append(flags.CFlags, "-DGTEST_OS_LINUX")
|
||||
flags.LdFlags = append(flags.LdFlags, "-lpthread")
|
||||
case common.Darwin:
|
||||
flags.CFlags = append(flags.CFlags, "-DGTEST_OS_MAC")
|
||||
flags.LdFlags = append(flags.LdFlags, "-lpthread")
|
||||
}
|
||||
} else {
|
||||
flags.CFlags = append(flags.CFlags, "-DGTEST_OS_LINUX_ANDROID")
|
||||
|
|
Loading…
Reference in a new issue