mlemay-intel added a comment.

In http://reviews.llvm.org/D19483#417865, @pcc wrote:

> > This makes sense for the example I gave. However, there are also more 
> > complicated situations. Sometimes it is necessary to specify different 
> > options for different files that are compiled for the same OS. For example, 
> > early during the initialization of a dynamic linker or C library, a 
> > single-threaded mode of USP storage needs to be supported. TLS is not 
> > available at that time. How should requirements like that be conveyed to 
> > the compiler?
>
>
> In cases like this, we should introduce a new `-m` flag in the Clang driver 
> and plumb that through to the SafeStack pass using a target-specific function 
> attribute.


It appears that Clang already supports an `-mthread_model=single` option, so do 
you recommend that I remove the `-mllvm -safe-stack-usp-storage=single-thread` 
option and rely on `-mthread_model` instead? I added @eugenis to get his 
feedback as well, since he approved my patch that added the new flag.  `-mllvm 
-safe-stack-usp-storage=single-thread` would have been documented for the first 
time by this patch, and I have not heard of anyone else using it yet.

I don't see any existing option that seems suitable for indicating that a file 
may be used during dynamic linker or C library initialization, so perhaps we 
should add an `-mruntime-init` flag?  I welcome other naming suggestions.


http://reviews.llvm.org/D19483



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to