Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: SConstruct

Issue 7586001: Fixed a known issue in D8 (read file), enabled D8 shared library build on Windows. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed the mess where d8 was getting the BUILDING_V8_SHARED compile flag. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | include/v8.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2011 the V8 project authors. All rights reserved. 1 # Copyright 2011 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 library_name += '-' + version 1387 library_name += '-' + version
1388 1388
1389 # Generate library SONAME if required by the build. 1389 # Generate library SONAME if required by the build.
1390 if context.options['soname'] == 'on': 1390 if context.options['soname'] == 'on':
1391 soname = GetSpecificSONAME() 1391 soname = GetSpecificSONAME()
1392 if soname == '': 1392 if soname == '':
1393 soname = 'lib' + library_name + '.so' 1393 soname = 'lib' + library_name + '.so'
1394 env['SONAME'] = soname 1394 env['SONAME'] = soname
1395 1395
1396 # Build the object files by invoking SCons recursively. 1396 # Build the object files by invoking SCons recursively.
1397 d8_env = Environment(tools=tools)
1398 d8_env.Replace(**context.flags['d8'])
1397 (object_files, shell_files, mksnapshot, preparser_files) = env.SConscript( 1399 (object_files, shell_files, mksnapshot, preparser_files) = env.SConscript(
1398 join('src', 'SConscript'), 1400 join('src', 'SConscript'),
1399 build_dir=join('obj', target_id), 1401 build_dir=join('obj', target_id),
1400 exports='context tools', 1402 exports='context tools d8_env',
1401 duplicate=False 1403 duplicate=False
1402 ) 1404 )
1403 1405
1404 context.mksnapshot_targets.append(mksnapshot) 1406 context.mksnapshot_targets.append(mksnapshot)
1405 1407
1406 # Link the object files into a library. 1408 # Link the object files into a library.
1407 env.Replace(**context.flags['v8']) 1409 env.Replace(**context.flags['v8'])
1408 1410
1409 context.ApplyEnvOverrides(env) 1411 context.ApplyEnvOverrides(env)
1410 if context.options['library'] == 'static': 1412 if context.options['library'] == 'static':
1411 library = env.StaticLibrary(library_name, object_files) 1413 library = env.StaticLibrary(library_name, object_files)
1412 preparser_library = env.StaticLibrary(preparser_library_name, 1414 preparser_library = env.StaticLibrary(preparser_library_name,
1413 preparser_files) 1415 preparser_files)
1414 else: 1416 else:
1415 # There seems to be a glitch in the way scons decides where to put 1417 # There seems to be a glitch in the way scons decides where to put
1416 # PDB files when compiling using MSVC so we specify it manually. 1418 # PDB files when compiling using MSVC so we specify it manually.
1417 # This should not affect any other platforms. 1419 # This should not affect any other platforms.
1418 pdb_name = library_name + '.dll.pdb' 1420 pdb_name = library_name + '.dll.pdb'
1419 library = env.SharedLibrary(library_name, object_files, PDB=pdb_name) 1421 library = env.SharedLibrary(library_name, object_files, PDB=pdb_name)
1420 preparser_pdb_name = preparser_library_name + '.dll.pdb'; 1422 preparser_pdb_name = preparser_library_name + '.dll.pdb';
1421 preparser_soname = 'lib' + preparser_library_name + '.so'; 1423 preparser_soname = 'lib' + preparser_library_name + '.so';
1422 preparser_library = env.SharedLibrary(preparser_library_name, 1424 preparser_library = env.SharedLibrary(preparser_library_name,
1423 preparser_files, 1425 preparser_files,
1424 PDB=preparser_pdb_name, 1426 PDB=preparser_pdb_name,
1425 SONAME=preparser_soname) 1427 SONAME=preparser_soname)
1426 context.library_targets.append(library) 1428 context.library_targets.append(library)
1427 context.library_targets.append(preparser_library) 1429 context.library_targets.append(preparser_library)
1428 1430
1429 d8_env = Environment(tools=tools)
1430 d8_env.Replace(**context.flags['d8'])
1431 context.ApplyEnvOverrides(d8_env) 1431 context.ApplyEnvOverrides(d8_env)
1432 if context.options['library'] == 'static': 1432 if context.options['library'] == 'static':
1433 shell = d8_env.Program('d8' + suffix, object_files + shell_files) 1433 shell = d8_env.Program('d8' + suffix, object_files + shell_files)
1434 else: 1434 else:
1435 shell = d8_env.Program('d8' + suffix, shell_files) 1435 shell = d8_env.Program('d8' + suffix, shell_files)
1436 d8_env.Depends(shell, library) 1436 d8_env.Depends(shell, library)
1437 context.d8_targets.append(shell) 1437 context.d8_targets.append(shell)
1438 1438
1439 for sample in context.samples: 1439 for sample in context.samples:
1440 sample_env = Environment(tools=tools) 1440 sample_env = Environment(tools=tools)
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 # version of scons. Also, there's a bug in some revisions that 1527 # version of scons. Also, there's a bug in some revisions that
1528 # doesn't allow this flag to be set, so we swallow any exceptions. 1528 # doesn't allow this flag to be set, so we swallow any exceptions.
1529 # Lovely. 1529 # Lovely.
1530 try: 1530 try:
1531 SetOption('warn', 'no-deprecated') 1531 SetOption('warn', 'no-deprecated')
1532 except: 1532 except:
1533 pass 1533 pass
1534 1534
1535 1535
1536 Build() 1536 Build()
OLDNEW
« no previous file with comments | « no previous file | include/v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698