From 82fbf54131fae6dbb74c0a125c68eecf46285154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 28 Dec 2022 17:19:51 +0100 Subject: [PATCH] [CompilerSupportLibraries_jll] Add `libssp` as product on Windows (#48012) --- .../src/CompilerSupportLibraries_jll.jl | 7 +++++++ stdlib/CompilerSupportLibraries_jll/test/runtests.jl | 3 +++ 2 files changed, 10 insertions(+) diff --git a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl index 604c7ae89dd5e..e58e16a46df35 100644 --- a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl +++ b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl @@ -21,6 +21,8 @@ libstdcxx_handle = C_NULL libstdcxx_path = "" libgomp_handle = C_NULL libgomp_path = "" +libssp_handle = C_NULL +libssp_path = "" if Sys.iswindows() if arch(HostPlatform()) == "x86_64" @@ -31,6 +33,7 @@ if Sys.iswindows() const libgfortran = string("libgfortran-", libgfortran_version(HostPlatform()).major, ".dll") const libstdcxx = "libstdc++-6.dll" const libgomp = "libgomp-1.dll" + const libssp = "libssp-0.dll" elseif Sys.isapple() if arch(HostPlatform()) == "aarch64" || libgfortran_version(HostPlatform()) == v"5" const libgcc_s = "@rpath/libgcc_s.1.1.dylib" @@ -56,6 +59,10 @@ function __init__() global libstdcxx_path = dlpath(libstdcxx_handle) global libgomp_handle = dlopen(libgomp) global libgomp_path = dlpath(libgomp_handle) + if Sys.iswindows() + global libssp_handle = dlopen(libssp) + global libssp_path = dlpath(libssp_handle) + end global artifact_dir = dirname(Sys.BINDIR) LIBPATH[] = dirname(libgcc_s_path) push!(LIBPATH_list, LIBPATH[]) diff --git a/stdlib/CompilerSupportLibraries_jll/test/runtests.jl b/stdlib/CompilerSupportLibraries_jll/test/runtests.jl index 85cf132c3a5bd..de823c7f66654 100644 --- a/stdlib/CompilerSupportLibraries_jll/test/runtests.jl +++ b/stdlib/CompilerSupportLibraries_jll/test/runtests.jl @@ -7,4 +7,7 @@ using Test, CompilerSupportLibraries_jll @test isfile(CompilerSupportLibraries_jll.libgfortran_path) @test isfile(CompilerSupportLibraries_jll.libstdcxx_path) @test isfile(CompilerSupportLibraries_jll.libgomp_path) + if Sys.iswindows() + @test isfile(CompilerSupportLibraries_jll.libssp_path) + end end