-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Build Foundation with DEPLOYMENT_RUNTIME_SWIFT disabled #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ME_SWIFT is disabled.
@@ -22,7 +23,7 @@ | |||
#include <libxml/xpath.h> | |||
#include <libxml/xpathInternals.h> | |||
#include <libxml/dict.h> | |||
#include "CFInternal.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we don't use CFInternal.h here at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't removed, it moved up & uses qualified path. Check line 15: <CoreFoundation/CFInternal.h>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks. Misread the diff.
@@ -168,6 +176,9 @@ _CFXMLInterfaceSAXHandler _CFXMLInterfaceCreateSAXHandler() { | |||
saxHandler->externalSubset = (externalSubsetSAXFunc)__CFSwiftBridge.NSXMLParser.externalSubset; | |||
|
|||
saxHandler->initialized = XML_SAX2_MAGIC; // make sure start/endElementNS are used | |||
#else | |||
memset(&saxHandler, 0, sizeof(saxHandler)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't the calloc above already promise us zeroed memory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, this line is not needed, I'll remove it.
lib/script.py
Outdated
#script += subitem | ||
continue | ||
else: | ||
script += item |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain a bit more about what this is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add Lily to review this one. script is a string. items is a list containing strings and lists. On python 2.7 we can not append a list into a string, so we need to walk it, appending the strings on the array.
The comment is to highlight the fact that I found no usage for the nested lists... Not sure what the intended usage was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @millenomi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC: This path is triggered by the += [ … ]
command that adds the block runtime, which is invoked if libdispatch is not available. Can you just build libdispatch as part of your CF build instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also fix that command to add single items instead of a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, for context: this is the portion of build.py that is triggering that behavior:
# This code is already in libdispatch so is only needed if libdispatch is
# NOT being used
if "LIBDISPATCH_SOURCE_DIR" not in Configuration.current.variables:
sources += (['closure/data.c', 'closure/runtime.c'])
It'd be nice to fix this bit, but in general you want to set your LIBDISPATCH_SOURCE_DIR
environment variable correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying LIBDISPATCH_SOURCE_DIR did not work for me. I just auggested a more pythonic way of applying the product commands... hopefully that is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I'm compiling from within CoreFoundation, so the build.py I'm using is in CoreFoundation/build.py, that scripts do not have any references to LIBDISPATCH_SOURCE_DIR.
@swift-ci please test |
@swift-ci please test and merge |
- This required by swiftlang#1559 but it was only tested on Linux.
- This is required by the change made in swiftlang#1559.
- This is required by the change made in swiftlang#1559.
Expand Linux platforms supported under DEPLOYMENT_RUNTIME_SWIFT=0 umbrella.