diff options
author | Dan Willemsen <dwillemsen@google.com> | 2019-02-20 13:56:15 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-02-20 13:56:15 -0800 |
commit | 1164b555248f623cb4c3d278c22c1653a7889681 (patch) | |
tree | 87c278e144d4172d50ea483ff378673f78dd1acd | |
parent | 89359db7bf5b498c794c7c4be45e4a68b08b8a26 (diff) | |
parent | a7c6b232c595589642caa1833279d940661120c2 (diff) | |
download | platform_external_python_cpython2-1164b555248f623cb4c3d278c22c1653a7889681.tar.gz platform_external_python_cpython2-1164b555248f623cb4c3d278c22c1653a7889681.tar.bz2 platform_external_python_cpython2-1164b555248f623cb4c3d278c22c1653a7889681.zip |
Build _scproxy for Mac
am: a7c6b232c5
Change-Id: Iff28074b9e2a8a6e437b8dd1376dfa10dd3cfbfa
-rw-r--r-- | Android.bp | 22 | ||||
-rw-r--r-- | Modules/config.c | 6 |
2 files changed, 28 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp index aba4538e69..b6dc00e2c1 100644 --- a/Android.bp +++ b/Android.bp @@ -237,6 +237,12 @@ cc_defaults { linux_glibc_x86_64: { host_ldlibs: ["-lutil"], }, + darwin: { + host_ldlibs: [ + "-framework SystemConfiguration", + "-framework CoreFoundation", + ], + }, host: { static_libs: ["libsqlite"], }, @@ -331,6 +337,11 @@ cc_library_static { "py2-c-module-_ctypes_test", "py2-c-module-_ctypes", ], + target: { + darwin: { + whole_static_libs: ["py2-c-module-_scproxy"], + }, + }, } cc_binary { @@ -937,3 +948,14 @@ cc_library_static { }, }, } + +cc_library_host_static { + name: "py2-c-module-_scproxy", + defaults: ["py2-interp-defaults"], + srcs: ["Mac/Modules/_scproxy.c"], + target: { + linux: { + enabled: false, + }, + }, +} diff --git a/Modules/config.c b/Modules/config.c index 677c06367e..2255347280 100644 --- a/Modules/config.c +++ b/Modules/config.c @@ -81,6 +81,9 @@ extern void initpyexpat(void); extern void init_sqlite3(void); extern void init_ctypes(void); extern void init_ctypes_test(void); +#ifdef __APPLE__ +extern void init_scproxy(void); +#endif /* -- ADDMODULE MARKER 1 -- */ @@ -150,6 +153,9 @@ struct _inittab _PyImport_Inittab[] = { {"_sqlite3", init_sqlite3}, {"_ctypes", init_ctypes}, {"_ctypes_test", init_ctypes_test}, +#ifdef __APPLE__ + {"_scproxy", init_scproxy}, +#endif /* -- ADDMODULE MARKER 2 -- */ |