kstoimenov added inline comments.

================
Comment at: compiler-rt/lib/asan/CMakeLists.txt:198
+    ARCHS ${ASAN_SUPPORTED_ARCH}
+    OBJECT_LIBS RTAsan_static
+    CFLAGS ${ASAN_CFLAGS}
----------------
thetruestblue wrote:
> Can you explain the motivation here?
> 
> RTAsan_static object library isn't built on Apple & Apple ASAN doesn't 
> support static libraries. is there a reason why this was added to Apple that 
> I'm missing?
> 
> I don't believe this actually builds anything on Apple platforms since no OS 
> is passed and in add_compiler_rt_runtime no libnames get set.
> 
> Even the tests added are not-apple specific.
As far as I remember it was because of the __asan_report_(load|store)n 
functions defined in asan_rtl_static.cpp. They are defined as weak so that we 
could link the binary without providing the implementation, which was later 
loaded from asan_rtl DSO. 

It is possible that we don't need this on Apple, but we will most likely need 
that on Windows. So if you are planning to make changes here you might have to 
revisit the 'NOT WIN32 AND NOT APPLE' statements to make sure we don't break 
the Windows build. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116182

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D116182: [ASa... Brittany Blue Gaston via Phabricator via cfe-commits
    • [PATCH] D116182:... Kirill Stoimenov via Phabricator via cfe-commits

Reply via email to