Skip to content

Conversation

@hughbe
Copy link
Contributor

@hughbe hughbe commented Feb 15, 2017

@gparker42

Commit 1:

  • Only defines SWIFT_USE_SWIFTCALL if we actually can use SWIFTCALL.
  • Also clean up now redundant s390x check

Commit 2:

  • Don't use these attributes if we don't have a compiler that supports them
  • This increases the portability of the shims, and helps resolve some Visual Studio contribution experience nits

Commit 3:

  • Don't bother working around Darwin module being pulled in by stdint.h on Windows, for obvious reasons

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is _WIN32 the right check here? I was expecting a check for clang versus MSVC.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, if the __INT_TYPE__ versions are a Darwin-specific workaround then they should be behind an affirmative check for Darwin. Then everyone else defaults to the cleaner stdint.h form.

Copy link
Contributor Author

@hughbe hughbe Feb 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, we have to define these here, as these are installed headers - we don't want to rely on external LLVM files here.

@hughbe
Copy link
Contributor Author

hughbe commented Feb 20, 2017

Here is the very odd Linux error..

/usr/include/x86_64-linux-gnu/sys/types.h:146:10: error: 'stddef.h' file not found
#include <stddef.h>
         ^
<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "AssertionReporting.h"

Looks like a bug?
http://askubuntu.com/questions/390805/clang-error-stddef-h-file-not-found
https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1242300
https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1198123
http://stackoverflow.com/questions/20587228/clang-error-stddef-file-not-found
android/ndk#215

@hughbe
Copy link
Contributor Author

hughbe commented Feb 20, 2017

@swift-ci please smoke test@swift-ci please smoke test

@gparker42
Copy link
Contributor

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants