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

Side by Side Diff: site_scons/site_tools/component_builders.py

Issue 140653005: Adds tls_edit utility which patches irt_core.nexe's TLS usage. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Rebased to master Created 6 years, 10 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 | « build/common.gypi ('k') | src/shared/gio/gio.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python2.4 1 #!/usr/bin/python2.4
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 # Redistribution and use in source and binary forms, with or without 6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are 7 # modification, are permitted provided that the following conditions are
8 # met: 8 # met:
9 # 9 #
10 # * Redistributions of source code must retain the above copyright 10 # * Redistributions of source code must retain the above copyright
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 # always linked in by the toolchain, i.e. startup files and -lc and such. 492 # always linked in by the toolchain, i.e. startup files and -lc and such.
493 if 'IMPLICIT_LIBS' in env: 493 if 'IMPLICIT_LIBS' in env:
494 env.Depends(out_nodes, env['IMPLICIT_LIBS']) 494 env.Depends(out_nodes, env['IMPLICIT_LIBS'])
495 495
496 # Publish output 496 # Publish output
497 env.Publish(prog_name, 'run', out_nodes[0]) 497 env.Publish(prog_name, 'run', out_nodes[0])
498 env.Publish(prog_name, 'debug', out_nodes[1:]) 498 env.Publish(prog_name, 'debug', out_nodes[1:])
499 499
500 # Add an alias to build the program to the right groups 500 # Add an alias to build the program to the right groups
501 a = env.Alias(prog_name, out_nodes) 501 a = env.Alias(prog_name, out_nodes)
502 for group in env['COMPONENT_PROGRAM_GROUPS']: 502 env.ComponentProgramAlias(a)
503 SCons.Script.Alias(group, a)
504 503
505 # Store list of components for this program 504 # Store list of components for this program
506 env._StoreComponents(prog_name) 505 env._StoreComponents(prog_name)
507 506
508 # Let component_targets know this target is available in the current mode 507 # Let component_targets know this target is available in the current mode
509 env.SetTargetProperty(prog_name, TARGET_PATH=out_nodes[0]) 508 env.SetTargetProperty(prog_name, TARGET_PATH=out_nodes[0])
510 509
511 # Set up deferred call to replicate resources 510 # Set up deferred call to replicate resources
512 env.Defer(ComponentProgramDeferred) 511 env.Defer(ComponentProgramDeferred)
513 512
514 # Return the executable 513 # Return the executable
515 return out_nodes[0] 514 return out_nodes[0]
516 515
516 def ComponentProgramAlias(self, program):
517 for group in self['COMPONENT_PROGRAM_GROUPS']:
518 SCons.Script.Alias(group, program)
519
517 #------------------------------------------------------------------------------ 520 #------------------------------------------------------------------------------
518 521
519 522
520 def ComponentTestOutput(self, test_name, nodes, **kwargs): 523 def ComponentTestOutput(self, test_name, nodes, **kwargs):
521 """Pseudo-builder for test output. 524 """Pseudo-builder for test output.
522 525
523 Args: 526 Args:
524 self: Environment in which we were called. 527 self: Environment in which we were called.
525 test_name: Test name. 528 test_name: Test name.
526 nodes: List of files/Nodes output by the test. 529 nodes: List of files/Nodes output by the test.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 # Defer per-environment initialization, but do before building SConscripts 635 # Defer per-environment initialization, but do before building SConscripts
633 env.Defer(_InitializeComponentBuilders) 636 env.Defer(_InitializeComponentBuilders)
634 env.Defer('BuildEnvironmentSConscripts', after=_InitializeComponentBuilders) 637 env.Defer('BuildEnvironmentSConscripts', after=_InitializeComponentBuilders)
635 638
636 # Add our pseudo-builder methods 639 # Add our pseudo-builder methods
637 env.AddMethod(_StoreComponents) 640 env.AddMethod(_StoreComponents)
638 env.AddMethod(ComponentPackage) 641 env.AddMethod(ComponentPackage)
639 env.AddMethod(ComponentObject) 642 env.AddMethod(ComponentObject)
640 env.AddMethod(ComponentLibrary) 643 env.AddMethod(ComponentLibrary)
641 env.AddMethod(ComponentProgram) 644 env.AddMethod(ComponentProgram)
645 env.AddMethod(ComponentProgramAlias)
642 env.AddMethod(ComponentTestProgram) 646 env.AddMethod(ComponentTestProgram)
643 env.AddMethod(ComponentTestOutput) 647 env.AddMethod(ComponentTestOutput)
644 648
645 # Add our target groups 649 # Add our target groups
646 AddTargetGroup('all_libraries', 'libraries can be built') 650 AddTargetGroup('all_libraries', 'libraries can be built')
647 AddTargetGroup('all_programs', 'programs can be built') 651 AddTargetGroup('all_programs', 'programs can be built')
648 AddTargetGroup('all_test_programs', 'tests can be built') 652 AddTargetGroup('all_test_programs', 'tests can be built')
649 AddTargetGroup('all_packages', 'packages can be built') 653 AddTargetGroup('all_packages', 'packages can be built')
650 AddTargetGroup('run_all_tests', 'tests can be run') 654 AddTargetGroup('run_all_tests', 'tests can be run')
651 AddTargetGroup('run_disabled_tests', 'tests are disabled') 655 AddTargetGroup('run_disabled_tests', 'tests are disabled')
652 AddTargetGroup('run_small_tests', 'small tests can be run') 656 AddTargetGroup('run_small_tests', 'small tests can be run')
653 AddTargetGroup('run_medium_tests', 'medium tests can be run') 657 AddTargetGroup('run_medium_tests', 'medium tests can be run')
654 AddTargetGroup('run_large_tests', 'large tests can be run') 658 AddTargetGroup('run_large_tests', 'large tests can be run')
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | src/shared/gio/gio.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698