Don't use GTEST_OS_LINUX on Darwin

Change-Id: If77118591daa7b474e6989e03109ea32ddd357b2
This commit is contained in:
Dan Willemsen 2016-05-13 14:13:01 -07:00
parent 8146b2f1c9
commit 4a94683a60

View file

@ -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")