SConscript (12307:cac42e5d3191) SConscript (12310:054571e07fc9)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 954 unchanged lines hidden (view full) ---

963
964 static_objs = []
965 shared_objs = []
966
967 for s in lib_sources.with_tag(Source.ungrouped_tag):
968 static_objs.append(make_static(s))
969 shared_objs.append(make_shared(s))
970
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 954 unchanged lines hidden (view full) ---

963
964 static_objs = []
965 shared_objs = []
966
967 for s in lib_sources.with_tag(Source.ungrouped_tag):
968 static_objs.append(make_static(s))
969 shared_objs.append(make_shared(s))
970
971 partial_objs = []
972
973 for group in Source.source_groups:
974 srcs = lib_sources.with_tag(Source.link_group_tag(group))
975 if not srcs:
976 continue
977
971 for group in Source.source_groups:
972 srcs = lib_sources.with_tag(Source.link_group_tag(group))
973 if not srcs:
974 continue
975
976 group_static = [ make_static(s) for s in srcs ]
977 group_shared = [ make_shared(s) for s in srcs ]
978
978 # If partial linking is disabled, add these sources to the build
979 # directly, and short circuit this loop.
980 if disable_partial:
979 # If partial linking is disabled, add these sources to the build
980 # directly, and short circuit this loop.
981 if disable_partial:
981 for s in srcs:
982 static_objs.append(make_static(s))
983 shared_objs.append(make_shared(s))
982 static_objs.extend(group_static)
983 shared_objs.extend(group_shared)
984 continue
985
986 # Set up the static partially linked objects.
984 continue
985
986 # Set up the static partially linked objects.
987 source_objs = [ make_static(s) for s in srcs ]
988 file_name = new_env.subst("${OBJPREFIX}lib${OBJSUFFIX}.partial")
989 target = File(joinpath(group, file_name))
987 file_name = new_env.subst("${OBJPREFIX}lib${OBJSUFFIX}.partial")
988 target = File(joinpath(group, file_name))
990 partial = env.PartialStatic(target=target, source=source_objs)
991 static_objs.append(partial)
989 partial = env.PartialStatic(target=target, source=group_static)
990 static_objs.extend(partial)
992
993 # Set up the shared partially linked objects.
991
992 # Set up the shared partially linked objects.
994 source_objs = [ make_shared(s) for s in srcs ]
995 file_name = new_env.subst("${SHOBJPREFIX}lib${SHOBJSUFFIX}.partial")
996 target = File(joinpath(group, file_name))
993 file_name = new_env.subst("${SHOBJPREFIX}lib${SHOBJSUFFIX}.partial")
994 target = File(joinpath(group, file_name))
997 partial = env.PartialShared(target=target, source=source_objs)
998 shared_objs.append(partial)
995 partial = env.PartialShared(target=target, source=group_shared)
996 shared_objs.extend(partial)
999
1000 static_date = make_static(date_source)
1001 new_env.Depends(static_date, static_objs)
997
998 static_date = make_static(date_source)
999 new_env.Depends(static_date, static_objs)
1002 static_objs.append(static_date)
1000 static_objs.extend(static_date)
1003
1004 shared_date = make_shared(date_source)
1005 new_env.Depends(shared_date, shared_objs)
1001
1002 shared_date = make_shared(date_source)
1003 new_env.Depends(shared_date, shared_objs)
1006 shared_objs.append(shared_date)
1004 shared_objs.extend(shared_date)
1007
1008 # First make a library of everything but main() so other programs can
1009 # link against m5.
1010 static_lib = new_env.StaticLibrary(libname, static_objs)
1011 shared_lib = new_env.SharedLibrary(libname, shared_objs)
1012
1013 # Now link a stub with main() and the static library.
1014 main_objs = [ make_static(s) for s in Source.all.with_tag('main') ]

--- 135 unchanged lines hidden ---
1005
1006 # First make a library of everything but main() so other programs can
1007 # link against m5.
1008 static_lib = new_env.StaticLibrary(libname, static_objs)
1009 shared_lib = new_env.SharedLibrary(libname, shared_objs)
1010
1011 # Now link a stub with main() and the static library.
1012 main_objs = [ make_static(s) for s in Source.all.with_tag('main') ]

--- 135 unchanged lines hidden ---