mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Allow the shared library initialization routine to be overridden with an initialize=xxx argument.
Should fix #492465.
This commit is contained in:
parent
dc74568782
commit
b66e1a3dd2
4 changed files with 10 additions and 5 deletions
|
@ -36,16 +36,17 @@ def genpluginproject(architecture, module,
|
|||
sources=[], sourcedirs=[],
|
||||
libraries=[], extradirs=[],
|
||||
extraexportsymbols=[], outputdir=":::Lib:lib-dynload",
|
||||
libraryflags=None, stdlibraryflags=None, prefixname=None):
|
||||
libraryflags=None, stdlibraryflags=None, prefixname=None,
|
||||
initialize=None):
|
||||
if architecture == "all":
|
||||
# For the time being we generate two project files. Not as nice as
|
||||
# a single multitarget project, but easier to implement for now.
|
||||
genpluginproject("ppc", module, project, projectdir, sources, sourcedirs,
|
||||
libraries, extradirs, extraexportsymbols, outputdir, libraryflags,
|
||||
stdlibraryflags, prefixname)
|
||||
stdlibraryflags, prefixname, initialize)
|
||||
genpluginproject("carbon", module, project, projectdir, sources, sourcedirs,
|
||||
libraries, extradirs, extraexportsymbols, outputdir, libraryflags,
|
||||
stdlibraryflags, prefixname)
|
||||
stdlibraryflags, prefixname, initialize)
|
||||
return
|
||||
templatename = "template-%s" % architecture
|
||||
targetname = "%s.%s" % (module, architecture)
|
||||
|
@ -99,6 +100,8 @@ def genpluginproject(architecture, module,
|
|||
dict['libraryflags'] = libraryflags
|
||||
if stdlibraryflags:
|
||||
dict['stdlibraryflags'] = stdlibraryflags
|
||||
if initialize:
|
||||
dict['initialize'] = initialize
|
||||
mkcwproject.mkproject(os.path.join(projectdir, project), module, dict,
|
||||
force=FORCEREBUILD, templatename=templatename)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue