This is an archive of the discontinued LLVM Phabricator instance.

Reland "[benchmark] Re-enable building benchmark tests"
ClosedPublic

Authored by DavidSpickett on Jul 16 2021, 8:10 AM.

Details

Summary

This reverts commit f6b04890c21ac634fcba6075017ec1487a85e132.

In MicroBenchmarks/libs/benchmark/CMakeLists.txt we decide
whether to enable assemble tests using function
should_enable_assembly_tests.

For example they are not enabled for non x86 platforms.

So the later dependencies should be guarded with a
check for BENCHMARK_ENABLE_ASSEMBLY_TESTS.

Diff Detail

Repository
rT test-suite

Event Timeline

DavidSpickett created this revision.Jul 16 2021, 8:10 AM
DavidSpickett requested review of this revision.Jul 16 2021, 8:10 AM
mtrofin accepted this revision.Jul 16 2021, 8:13 AM

LGTM - thanks!

MicroBenchmarks/libs/CMakeLists.txt
17

Nit: could you indent lines 17-19? Thanks!

This revision is now accepted and ready to land.Jul 16 2021, 8:13 AM

This seems logical to me but putting in review just in case you had other goals with this change. Test suite passes on AArch64 with this and I see MicroBenchmark mentions in the results so I assume it's doing the right thing.

See https://github.com/llvm/llvm-test-suite/blob/main/MicroBenchmarks/libs/benchmark/CMakeLists.txt#L52 for the place where we decide to enable asm tests.

DavidSpickett added inline comments.Jul 16 2021, 8:15 AM
MicroBenchmarks/libs/CMakeLists.txt
17

They're 2 space intended, that seems to match the other cmake files.

DavidSpickett retitled this revision from Reland "[benchmark] Re-enable building benchmark tests"" to Reland "[benchmark] Re-enable building benchmark tests".Jul 16 2021, 8:19 AM
DavidSpickett added inline comments.Jul 16 2021, 8:21 AM
MicroBenchmarks/libs/CMakeLists.txt
17

indented*

mtrofin added inline comments.Jul 16 2021, 8:27 AM
MicroBenchmarks/libs/CMakeLists.txt
17

huh. Indeed! Sorry.

It seems that if I have the browser window squeezed to 1/2 screen, the indent isn't shown.

The first error I'm seeing is:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:492:1: error: expected unqualified-id
@class NSString, Protocol;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:494:9: error: unknown type name 'NSString'
typedef NSString * NSExceptionName NS_EXTENSIBLE_STRING_ENUM;

which I have trouble to see how is related to this change. Maybe I'm missing something?

The error comes from gtest-port.cc which does #import <Foundation/Foundation.h>. Is it possible there is some C++/Objective C mixing issue here and we need to add some a flag or build option? (though if #import works at all it must have some understanding)

mtrofin added a comment.EditedJul 19 2021, 7:31 AM

The error comes from gtest-port.cc which does #import <Foundation/Foundation.h>. Is it possible there is some C++/Objective C mixing issue here and we need to add some a flag or build option? (though if #import works at all it must have some understanding)

Ah, I see. Can we just disable benchmark testing for iOS?

Created https://reviews.llvm.org/D106281 - I don't have a iOS build setup, though, so it'd be good if someone verified this; or we can wait for it to land?

The error comes from gtest-port.cc which does #import <Foundation/Foundation.h>. Is it possible there is some C++/Objective C mixing issue here and we need to add some a flag or build option? (though if #import works at all it must have some understanding)

Ah, I see. Can we just disable benchmark testing for iOS?

Created https://reviews.llvm.org/D106281 - I don't have a iOS build setup, though, so it'd be good if someone verified this; or we can wait for it to land?

It should be ok to go ahead and land. We can verify it on the Green Dragon bot listed above.