Skip to content

Commit 21445a8

Browse files
committed
Build libzsupport with Ninja
1 parent 2a81839 commit 21445a8

File tree

4 files changed

+43
-4
lines changed

4 files changed

+43
-4
lines changed

graalpython/com.oracle.graal.python.cext/setup.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,6 @@ def stripped_object_filenames(*args, **kwargs):
629629
if WIN32:
630630
return # TODO: ...
631631
build_libposix(capi_home)
632-
build_nativelibsupport(capi_home,
633-
subdir="zlib",
634-
libname="libzsupport",
635-
libs=['z'])
636632
build_nativelibsupport(capi_home,
637633
subdir="bz2",
638634
libname="libbz2support",

mx.graalpython/mx_graalpython.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,13 +1610,21 @@ def py_version_short(*args):
16101610
def graal_version_short(*args):
16111611
return GRAAL_VERSION
16121612

1613+
def graalpy_ext(arg):
1614+
if arg == "soabi":
1615+
# TODO(fa): do properly
1616+
return ".graalpy231-310-native-x86_64-darwin.so"
1617+
raise ValueError("unknown ext type requested: " + arg)
1618+
16131619

16141620
mx_subst.path_substitutions.register_with_arg('suite', _get_suite_dir)
16151621
mx_subst.path_substitutions.register_with_arg('src_dir', _get_src_dir)
16161622
mx_subst.path_substitutions.register_with_arg('output_root', _get_output_root)
16171623
mx_subst.path_substitutions.register_with_arg('py_ver', py_version_short)
16181624
mx_subst.path_substitutions.register_with_arg('graal_ver', graal_version_short)
16191625

1626+
mx_subst.string_substitutions.register_with_arg('ext', graalpy_ext)
1627+
16201628

16211629
def delete_self_if_testdownstream(args):
16221630
"""

mx.graalpython/suite.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,30 @@
519519
},
520520
},
521521

522+
"python-libzsupport": {
523+
"subDir": "graalpython",
524+
"native": "shared_lib",
525+
"deliverable": "zsupport",
526+
"buildDependencies": [],
527+
"cflags": [
528+
"-DNDEBUG", "-g", "-O3", "-Werror",
529+
],
530+
"ldlibs": ["-lz"],
531+
"os_arch": {
532+
"windows": {
533+
"<others>": {
534+
# "/Z7", "/O2", "/WX", # cflags to replace -g -O3 -Werror
535+
"defaultBuild": False,
536+
},
537+
},
538+
"<others>": {
539+
"<others>": {
540+
"defaultBuild" : True,
541+
},
542+
},
543+
},
544+
},
545+
522546
"python-lib": {
523547
"class": "ArchiveProject",
524548
"outputDir": "graalpython/lib-python/3",
@@ -714,6 +738,7 @@
714738
],
715739
"dependencies": [
716740
"com.oracle.graal.python.cext",
741+
"python-libzsupport",
717742
],
718743
"os_arch": {
719744
"windows": {
@@ -733,6 +758,11 @@
733758
"dependency": "graalpython:com.oracle.graal.python.cext",
734759
"path": "*",
735760
},
761+
{
762+
"source_type": "dependency",
763+
"dependency": "graalpython:python-libzsupport",
764+
"path": "*",
765+
},
736766
],
737767
"./lib-graalpython/modules/graalpy_virtualenv": [
738768
"file:graalpy_virtualenv/graalpy_virtualenv",
@@ -761,6 +791,11 @@
761791
"path": "*",
762792
"exclude": ["CEXT-WINDOWS-README.md"],
763793
},
794+
{
795+
"source_type": "dependency",
796+
"dependency": "graalpython:python-libzsupport",
797+
"path": "*",
798+
},
764799
],
765800
"./lib/graalpy<graal_ver:major_minor_nodot>/modules/graalpy_virtualenv": [
766801
"file:graalpy_virtualenv/graalpy_virtualenv",

0 commit comments

Comments
 (0)