File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ jemalloc_lib = File.expand_path('jemalloc/lib/libjemalloc.a', __dir__)
2020file jemalloc_lib do
2121 Dir . chdir ( 'jemalloc' ) do
2222 sh './autogen.sh'
23- sh './configure --disable-initial-exec-tls --with-pic'
23+ sh './configure --disable-initial-exec-tls --with-pic' , env : { 'CFLAGS' => '-fPIC' }
2424 sh "make -j #{ Etc . nprocessors } "
2525 end
2626end
@@ -44,7 +44,7 @@ def patch_cmake_static_jemalloc
4444 return unless File . file? ( file )
4545
4646 orig = "#{ file } .orig"
47- return if File . exist? ( orig )
47+ orig = nil if File . exist? ( orig )
4848
4949 content = File . read ( file )
5050
@@ -56,7 +56,7 @@ def patch_cmake_static_jemalloc
5656 return if content . include? ( 'add_library(jemalloc STATIC IMPORTED)' )
5757
5858 content = jemalloc_declaration + "\n " + content
59- File . write ( orig , File . read ( file ) )
59+ File . write ( orig , File . read ( file ) ) if orig
6060 File . write ( file , content )
6161 puts "Inserted static jemalloc declaration into: #{ file } "
6262end
You can’t perform that action at this time.
0 commit comments