Index: SConstruct |
diff --git a/SConstruct b/SConstruct |
index 5276ce2cae6e2769cfeecb11f48f5e4f060ed37b..03a615c9a4658274e2657828ecba37641c40e3e0 100644 |
--- a/SConstruct |
+++ b/SConstruct |
@@ -773,6 +773,13 @@ PREPARSER_FLAGS = { |
D8_FLAGS = { |
+ 'all': { |
+ 'library:shared': { |
+ 'CPPDEFINES': ['V8_SHARED'], |
+ 'LIBS': ['v8'], |
+ 'LIBPATH': ['.'] |
+ }, |
+ }, |
'gcc': { |
'all': { |
'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
@@ -1370,7 +1377,11 @@ def BuildSpecific(env, mode, env_overrides, tools): |
d8_env = Environment(tools=tools) |
d8_env.Replace(**context.flags['d8']) |
context.ApplyEnvOverrides(d8_env) |
- shell = d8_env.Program('d8' + suffix, object_files + shell_files) |
+ if context.options['library'] == 'static': |
+ shell = d8_env.Program('d8' + suffix, object_files + shell_files) |
+ else: |
+ shell = d8_env.Program('d8' + suffix, shell_files) |
+ d8_env.Depends(shell, library) |
context.d8_targets.append(shell) |
for sample in context.samples: |