[PATCH] D67385: Pass -mcmodel to LTO plugin

Kuan Hsu Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 24 08:57:17 PDT 2019


khchen added a comment.

@tejohnson for example:

  $ clang -flto a.c -c -o a.o
  $ llvm-ar q a.a a.o          // archive libraries      
  $ clang -flto a.a b.c -O2 -o main -mcmodel=small 

In above case user need to aware that passing `-Wl,-plugin-opt=-code-model=small` to plugin is necessary.
It seems to me that is inconvenience because I believe user doesn't know it.

I think this case is similar to if a user has a bitcode library compiled with -O2 or -Oz, and link a program with -O3 -flto, what is expected behavior for user?


Repository:
  rC Clang

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

https://reviews.llvm.org/D67385





More information about the cfe-commits mailing list