Skip to content

Commit

Permalink
unix: link against Cocoa framework for tkinter
Browse files Browse the repository at this point in the history
When debugging a separate tk issue, I noticed that tk's build system
links against Cocoa in its latest version. So we should do the same.
  • Loading branch information
indygreg committed Jun 27, 2022
1 parent bb072a5 commit a452f43
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpython-unix/static-modules.3.10.macos
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _testimportmultiple _testimportmultiple.c
_testinternalcapi _testinternalcapi.c -DPy_BUILD_CORE_MODULE
_testmultiphase _testmultiphase.c
# CoreFoundation isn't a directory dependency but is a dependency of libtcl and libtk.
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -framework AppKit -framework ApplicationServices -framework Carbon -framework CoreFoundation -framework CoreServices -framework CoreGraphics -framework IOKit -framework QuartzCore -Xlinker -hidden-ltcl8.6 -Xlinker -hidden-ltk8.6
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -framework AppKit -framework ApplicationServices -framework Carbon -framework Cocoa -framework CoreFoundation -framework CoreServices -framework CoreGraphics -framework IOKit -framework QuartzCore -Xlinker -hidden-ltcl8.6 -Xlinker -hidden-ltk8.6
_uuid _uuidmodule.c -Xlinker -hidden-luuid
_xxsubinterpreters _xxsubinterpretersmodule.c
_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
Expand Down
2 changes: 1 addition & 1 deletion cpython-unix/static-modules.3.8.macos
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation
_sqlite3 _sqlite/cache.c _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -IModules/_sqlite -DMODULE_NAME=\"sqlite3\" -Xlinker -hidden-lsqlite3
_ssl _ssl.c -Xlinker -hidden-lssl -Xlinker -hidden-lcrypto
# CoreFoundation isn't a directory dependency but is a dependency of libtcl and libtk.
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -framework AppKit -framework ApplicationServices -framework Carbon -framework CoreFoundation -framework CoreServices -framework CoreGraphics -framework IOKit -framework QuartzCore -Xlinker -hidden-ltcl8.6 -Xlinker -hidden-ltk8.6
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -framework AppKit -framework ApplicationServices -framework Carbon -framework Cocoa -framework CoreFoundation -framework CoreServices -framework CoreGraphics -framework IOKit -framework QuartzCore -Xlinker -hidden-ltcl8.6 -Xlinker -hidden-ltk8.6
_uuid _uuidmodule.c -Xlinker -hidden-luuid
pyexpat pyexpat.c expat/xmlparse.c expat/xmlrole.c expat/xmltok.c -DHAVE_EXPAT_CONFIG_H=1 -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI -IModules/expat
readline readline.c -Xlinker -hidden-ledit -Xlinker -hidden-lncurses
2 changes: 1 addition & 1 deletion cpython-unix/static-modules.3.9.macos
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _testimportmultiple _testimportmultiple.c
_testinternalcapi _testinternalcapi.c -DPy_BUILD_CORE_MODULE
_testmultiphase _testmultiphase.c
# CoreFoundation isn't a directory dependency but is a dependency of libtcl and libtk.
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -framework AppKit -framework ApplicationServices -framework Carbon -framework CoreFoundation -framework CoreServices -framework CoreGraphics -framework IOKit -framework QuartzCore -Xlinker -hidden-ltcl8.6 -Xlinker -hidden-ltk8.6
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -framework AppKit -framework ApplicationServices -framework Carbon -framework Cocoa -framework CoreFoundation -framework CoreServices -framework CoreGraphics -framework IOKit -framework QuartzCore -Xlinker -hidden-ltcl8.6 -Xlinker -hidden-ltk8.6
_uuid _uuidmodule.c -Xlinker -hidden-luuid
_xxsubinterpreters _xxsubinterpretersmodule.c
_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
Expand Down
5 changes: 5 additions & 0 deletions src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ static DARWIN_ALLOWED_DYLIBS: Lazy<Vec<MachOAllowedDylib>> = Lazy::new(|| {
max_compatibility_version: "2.0.0".try_into().unwrap(),
required: true,
},
MachOAllowedDylib {
name: "/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa".to_string(),
max_compatibility_version: "1.0.0".try_into().unwrap(),
required: true,
},
MachOAllowedDylib {
name:
"/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"
Expand Down

0 comments on commit a452f43

Please sign in to comment.