add visibility=default to exported functions, visibility=hidden to most assembler#5577
add visibility=default to exported functions, visibility=hidden to most assembler#5577mattip wants to merge 10 commits intoOpenMathLib:developfrom
Conversation
| .SUFFIXES: .c .o | ||
| .c.o: | ||
| $(CC) $(CFLAGS) -I../include -c -o $@ $< | ||
| $(CC) $(filter-out -fvisibility=hidden, $(CFLAGS)) -I../include -c -o $@ $< |
There was a problem hiding this comment.
Rather than add OPENBLAS_EXPORT to all the functions here and in ../utils, I removed the flag from the Makefile. I should do the same for the CMake. How does one tweak the flags per-directory in CMake?
There was a problem hiding this comment.
Sorry for being a bit behind the curve on this - I think you could do a string(REPLACE "-fvisibility=hidden" "" LAPACK_CFLAGS ${LAPACK_CFLAGS}) in cmake/system.cmake (or at the end of cmake/lapacke.cmake where there is the set_source_files_properties() to apply these LAPACK_CFLAGS)
|
The clang builds are complaining about the assembler directive But the passing gcc builds are happy enough with it. I wonder if there is another way to tell clang to hide the assembler function without resorting to |
|
I got the documentation for |
|
The Windows_cl job is failing since on windows I need the full The other failures are due to timeouts or network issues, and I don't think they are connected to this PR. I am still thinking about the best way to add |
|
Ahh, the shipped |
|
I think I have now removed the Where would be the best place to add a non-MSVC default -fvisibility=hidden? Somewhere in |
|
Rebased off HEAD and added |
Towards #5560
OPENBLAS_EXPORTmacro that maps to__attribute__ ((visibility ("default")))interfacesand some inkernels/genericPROLOGUEassembler macro to hide functions by default, and use aPROLOGUE_EXPORTmacro where functions should be exportedWhere would be the best place to add a non-MSVC default
-fvisibility=hidden? Somewhere inMakefile.systemI guess, but how/where?Note most of this was done as part of MacPython/openblas-libs#241, and I tested it there on the most popular builds.