From: Jacob Lifshay Date: Sat, 2 Sep 2017 01:48:26 +0000 (-0700) Subject: change default symbol visibility to hidden X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c669895a19d051fd2dc40795bc3e7cecac9a33e;p=kazan.git change default symbol visibility to hidden --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c264eb..da0f0e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,10 +18,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_C_VISIBILITY_PRESET hidden) +set(CMAKE_CXX_VISIBILITY_PRESET hidden) project(vulkan-cpu CXX C) if(NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cdfb701..9f4d130 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) add_subdirectory(demo) add_subdirectory(generate_spirv_parser) diff --git a/src/demo/CMakeLists.txt b/src/demo/CMakeLists.txt index 15209c7..0bb3086 100644 --- a/src/demo/CMakeLists.txt +++ b/src/demo/CMakeLists.txt @@ -18,10 +18,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) find_package(SDL2 REQUIRED) string(STRIP ${SDL2_LIBRARIES} libraries) # workaround SDL2 automake bug set(sources demo.cpp) add_executable(demo ${sources}) target_include_directories(demo PRIVATE ${SDL2_INCLUDE_DIRS}) target_link_libraries(demo ${libraries} vulkan_cpu_spirv vulkan_cpu_util vulkan_cpu_pipeline vulkan_cpu_vulkan) +set_target_properties(demo PROPERTIES + C_VISIBILITY_PRESET hidden + CXX_VISIBILITY_PRESET hidden) diff --git a/src/generate_spirv_parser/CMakeLists.txt b/src/generate_spirv_parser/CMakeLists.txt index ba4f408..4b9c979 100644 --- a/src/generate_spirv_parser/CMakeLists.txt +++ b/src/generate_spirv_parser/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(sources ast.cpp generate.cpp generate_spirv_parser.cpp diff --git a/src/image/CMakeLists.txt b/src/image/CMakeLists.txt index 297725f..f4af74a 100644 --- a/src/image/CMakeLists.txt +++ b/src/image/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(sources image.cpp) add_library(vulkan_cpu_image STATIC ${sources}) target_link_libraries(vulkan_cpu_image vulkan_cpu_util vulkan_cpu_llvm_wrapper vulkan_cpu_vulkan) diff --git a/src/json/CMakeLists.txt b/src/json/CMakeLists.txt index eab6d41..d0ac3dc 100644 --- a/src/json/CMakeLists.txt +++ b/src/json/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(sources json.cpp location.cpp parser.cpp diff --git a/src/llvm_wrapper/CMakeLists.txt b/src/llvm_wrapper/CMakeLists.txt index d4c5408..ad40191 100644 --- a/src/llvm_wrapper/CMakeLists.txt +++ b/src/llvm_wrapper/CMakeLists.txt @@ -18,12 +18,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(sources llvm_wrapper.cpp orc_compile_stack.cpp) add_library(vulkan_cpu_llvm_wrapper STATIC ${sources}) -if(1) +if(0) llvm_map_components_to_libnames(llvm_libraries core native analysis orcjit mcjit nativecodegen ipo scalaropts vectorize) else() set(llvm_libraries LLVM) diff --git a/src/llvm_wrapper/llvm_wrapper.cpp b/src/llvm_wrapper/llvm_wrapper.cpp index 46c6cfd..7473d00 100644 --- a/src/llvm_wrapper/llvm_wrapper.cpp +++ b/src/llvm_wrapper/llvm_wrapper.cpp @@ -53,6 +53,7 @@ void Context::init_helper() throw std::runtime_error("LLVMInitializeNativeAsmPrinter failed"); if(::LLVMInitializeNativeDisassembler() != 0) throw std::runtime_error("LLVMInitializeNativeDisassembler failed"); +#if 0 static struct LLVM_shutdown { ~LLVM_shutdown() @@ -60,6 +61,7 @@ void Context::init_helper() ::LLVMShutdown(); } } llvm_shutdown; +#endif } LLVM_string Target::get_process_target_triple() diff --git a/src/pipeline/CMakeLists.txt b/src/pipeline/CMakeLists.txt index 1b73327..127767c 100644 --- a/src/pipeline/CMakeLists.txt +++ b/src/pipeline/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(sources pipeline.cpp) add_library(vulkan_cpu_pipeline STATIC ${sources}) diff --git a/src/spirv/CMakeLists.txt b/src/spirv/CMakeLists.txt index 5ccefc3..12ed97f 100644 --- a/src/spirv/CMakeLists.txt +++ b/src/spirv/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(sources literal_string.cpp) diff --git a/src/spirv_to_llvm/CMakeLists.txt b/src/spirv_to_llvm/CMakeLists.txt index df9701b..43274e7 100644 --- a/src/spirv_to_llvm/CMakeLists.txt +++ b/src/spirv_to_llvm/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(sources core_instructions.cpp fragment_entry_point.cpp diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 4a8e995..df15463 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) include(TestBigEndian) TEST_BIG_ENDIAN(is_big_endian) if(is_big_endian) diff --git a/src/vulkan/CMakeLists.txt b/src/vulkan/CMakeLists.txt index d079c0c..e1a1ff2 100644 --- a/src/vulkan/CMakeLists.txt +++ b/src/vulkan/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) set(sources vulkan.cpp) add_library(vulkan_cpu_vulkan STATIC ${sources}) target_compile_definitions(vulkan_cpu_vulkan PUBLIC VK_NO_PROTOTYPES)