MCPcopy Create free account
hub / github.com/boostorg/build / MsvcLinkingGenerator

Class MsvcLinkingGenerator

v2/tools/msvc.py:894–925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

892
893
894class MsvcLinkingGenerator(builtin.LinkingGenerator):
895 # Calls the base version. If necessary, also create a target for the
896 # manifest file.specifying source's name as the name of the created
897 # target. As result, the PCH will be named whatever.hpp.gch, and not
898 # whatever.gch.
899 def generated_targets(self, sources, prop_set, project, name):
900 result = builtin.LinkingGenerator.generated_targets(self, sources, prop_set, project, name)
901 if result:
902 name_main = result[0].name()
903 action = result[0].action()
904
905 if prop_set.get('<debug-symbols>') == 'on':
906 # We force exact name on PDB. The reason is tagging -- the tag rule may
907 # reasonably special case some target types, like SHARED_LIB. The tag rule
908 # will not catch PDB, and it cannot even easily figure if PDB is paired with
909 # SHARED_LIB or EXE or something else. Because PDB always get the
910 # same name as the main target, with .pdb as extension, just force it.
911 target = FileTarget(name_main.split_ext()[0]+'.pdb','PDB',project,action,True)
912 registered_target = virtual_target.register(target)
913 if target != registered_target:
914 action.replace_targets(target,registered_target)
915 result.append(registered_target)
916 if prop_set.get('<embed-manifest>') == 'off':
917 # Manifest is evil target. It has .manifest appened to the name of
918 # main target, including extension. E.g. a.exe.manifest. We use 'exact'
919 # name because to achieve this effect.
920 target = FileTarget(name_main+'.manifest', 'MANIFEST', project, action, True)
921 registered_target = virtual_target.register(target)
922 if target != registered_target:
923 action.replace_targets(target,registered_target)
924 result.append(registered_target)
925 return result
926
927
928# Unsafe worker rule for the register-toolset() rule. Must not be called

Callers 1

register_toolset_reallyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected