dingxiaoshuai123 commented on issue #845:
URL: https://github.com/apache/brpc/issues/845#issuecomment-1996780032

   > > > > master 已修复
   > > > 
   > > > 
   > > > Hi @wwbmmm 
,我看了下master的提交记录,好像是给g++添加了`-fno-gcse`的编译选项来修复这个问题,请问,如果用clang编译器编译brpc的话,得怎么处理呢?
   > > 
   > > 
   > > 目前还不太清楚clang中有没有对应选项
   > 
   > Mac M1 下确实还会遇到这个问题,目前似乎没有找到对应的选项来解决这个问题。 stackoverflow 
上问了下类似的情况:[https://stackoverflow.com/questions/75592038/how-to-disable-clang-expression-elimination-for-thread-local-variable/75622732#75622732。](https://stackoverflow.com/questions/75592038/how-to-disable-clang-expression-elimination-for-thread-local-variable/75622732#75622732%E3%80%82)
   > 
   > 建议是说给获取 tls 的变量加上 noinline 的函数防止优化,但是可能存在函数调用开销。 参考 qemu 
的做法:https://github.com/qemu/qemu/blob/d7e2fe4aac8b74bbfe82b2309536528b4dbe0d34/include/qemu/coroutine-tls.h#L141-L163
   > 
   > 是否可以在 clang && mac 的情况下走这个解决方法,避免错误的产生?
   
   您好,请问在 clang && mac 的情况下解决了吗?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to