[libc-commits] [PATCH] D100646: [libc] Add a set of elementary operations

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Apr 28 08:21:19 PDT 2021


sivachandra added inline comments.


================
Comment at: libc/test/src/string/memory_utils/CMakeLists.txt:14
+  COMPILE_OPTIONS
+    -march=native
 )
----------------
gchatelet wrote:
> avieira wrote:
> > AArch64 doesn't support -march=native, we use -mcpu=native instead, so it would be good to specify the correct option per target. 
> Thx I wasn't aware of this. I found this article, it's helpful and confusing at the same time :-D
> https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu
> 
> @sivachandra should we define a new CMake macro or do you think this should be part of `add_libc_unittest`?
> The aim is to use whatever is available on the host machine when performing the tests.
> @sivachandra should we define a new CMake macro or do you think this should be part of `add_libc_unittest`?
> The aim is to use whatever is available on the host machine when performing the tests.

I suppose you are asking about adding `-march=native` and `-mcpu=native`? If yes, then I think we should add a top-level var like `LLVM_LIBC_COMMON_COMPILE_OPTIONS` which get set to the appropriate value based on the target machine. And then, both `add_entrypoint_object` and `add_libc_unittest` should use it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100646/new/

https://reviews.llvm.org/D100646



More information about the libc-commits mailing list