[libc-commits] [PATCH] D101895: [libc] Simplifies multi implementations

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu May 6 07:45:05 PDT 2021


gchatelet added inline comments.


================
Comment at: libc/src/string/CMakeLists.txt:234
+                                      COMPILE_OPTIONS "-mllvm --tail-merge-threshold=0")
+  add_memcpy(memcpy                   COMPILE_OPTIONS "-mllvm --tail-merge-threshold=0")
 else()
----------------
gchatelet wrote:
> avieira wrote:
> > During some of my experiments I learned that CMAKE prefers if you pass such options with "SHELL:-mllvm --tail-mege-threshold=0" just in case there is another '-mllvm opt' or '-A B' like option.
> > 
> > Having said this, I am not seeing (with either SHELL or not) this option being passed when I do `ninja libc-benchmark-main -v -v', but don't quote me on this just yet, I might need to update all the patches you've put up for review.
> > 
> > Any chance you can verify you are seeing the same on your side?
> I confirm that it does not work : D
> For one, I need to remove the double quotes, then SHELL does not seem to work.
> I'm looking into it and will provide an update shortly.
So the proper way to do it is to double quote AND use `SHELL` at the same time, e.g.
```
add_memcpy(memcpy COMPILE_OPTIONS "SHELL:-mllvm --tail-merge-threshold=0"
                  COMPILE_OPTIONS "SHELL:-mllvm --combiner-global-alias-analysis")
```

If `SHELL` is not provided we should not double quote. I'll update the patch soonish.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101895



More information about the libc-commits mailing list