Commit 70e78a48 authored by ian@well-typed.com's avatar ian@well-typed.com

Add a -static way, enabled only if dynlibs are used by default

parent 7f91d0da
......@@ -56,6 +56,9 @@ if (ghc_with_dynamic_rts == 1):
config.have_shared_libs = True
config.run_ways.append('dyn')
if (ghc_dynamic_by_default == 1):
config.run_ways.append('static')
if (ghc_with_profiling == 1 and ghc_with_threaded_rts == 1):
config.run_ways.append('profthreaded')
......@@ -90,6 +93,7 @@ config.way_flags = {
'prof_hy' : ['-O', '-prof', '-auto-all'],
'prof_hr' : ['-O', '-prof', '-auto-all'],
'dyn' : ['-O', '-dynamic'],
'static' : ['-O', '-static'],
# llvm variants...
'profllvm' : ['-prof', '-auto-all', '-fllvm'],
'profoptllvm' : ['-O', '-prof', '-auto-all', '-fllvm'],
......@@ -123,6 +127,7 @@ config.way_rts_flags = {
'prof_hy' : ['-hy'],
'prof_hr' : ['-hr'],
'dyn' : [],
'static' : [],
# llvm variants...
'profllvm' : ['-p'],
'profoptllvm' : ['-hc', '-p'],
......
......@@ -22,6 +22,7 @@ main = do
getGhcField fields "GhcUnregisterised" "Unregisterised"
getGhcField fields "GhcWithSMP" "Support SMP"
getGhcField fields "GhcRTSWays" "RTS ways"
getGhcField fields "GhcDynamicByDefault" "Dynamic by default"
getGhcFieldProgWithDefault fields "AR" "ar command" "ar"
let pkgdb_flag = case lookup "Project version" fields of
......
......@@ -80,6 +80,12 @@ else
RUNTEST_OPTS += -e ghc_unregisterised=0
endif
ifeq "$(GhcDynamicByDefault)" "YES"
RUNTEST_OPTS += -e ghc_dynamic_by_default=1
else
RUNTEST_OPTS += -e ghc_dynamic_by_default=0
endif
ifeq "$(GhcWithSMP)" "YES"
RUNTEST_OPTS += -e ghc_with_smp=1
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment