-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[lua] support iOS triplets #16107
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
Merged
Merged
[lua] support iOS triplets #16107
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b0cfe41
[lua] support iOS triplets
luncliff c08daed
[lua] revert feature separation
luncliff f94adf3
[lua] update port SHA
luncliff 7d53833
[lua] make 'tools' default-feature
luncliff 8d7786b
Merge branch 'master' into ios/lua
luncliff f804999
Merge branch 'master' into ios/lua
luncliff 5b0c074
[lua] fix after collision
luncliff 7fa23a2
Update ports/lua/portfile.cmake
luncliff 904f127
Update ports/lua/portfile.cmake
luncliff 487a263
[lua] import TargetConditionals for apple platform
luncliff 52ef8bc
Merge branch 'master' into ios/lua
luncliff 1a8ee14
Update ports/lua/vcpkg.json
luncliff a96600a
Update ports/lua/portfile.cmake
luncliff e6b7151
[lua] remove negations for 'tool' config
luncliff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| diff --git a/src/loslib.c b/src/loslib.c | ||
| index e65e188..3595601 100644 | ||
| --- a/src/loslib.c | ||
| +++ b/src/loslib.c | ||
| @@ -3,7 +3,9 @@ | ||
| ** Standard Operating System library | ||
| ** See Copyright Notice in lua.h | ||
| */ | ||
| - | ||
| +#if defined(__APPLE__) | ||
| +#include <TargetConditionals.h> | ||
| +#endif | ||
| #define loslib_c | ||
| #define LUA_LIB | ||
|
|
||
| @@ -143,7 +145,12 @@ static int os_execute (lua_State *L) { | ||
| const char *cmd = luaL_optstring(L, 1, NULL); | ||
| int stat; | ||
| errno = 0; | ||
| - stat = system(cmd); | ||
| +#if defined(__APPLE__) && !TARGET_OS_OSX | ||
| + // system() is __IOS_PROHIBITED, __WATCHOS_PROHIBITED, and __TVOS_PROHIBITED. | ||
| + stat = 127; // error: shell execution failed | ||
| +#else | ||
| + stat = system(cmd); | ||
| +#endif | ||
| if (cmd != NULL) | ||
| return luaL_execresult(L, stat); | ||
| else { | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "name": "lua", | ||
| "version-string": "5.4.3", | ||
| "port-version": 1, | ||
| "description": "A powerful, fast, lightweight, embeddable scripting language", | ||
| "homepage": "https://www.lua.org", | ||
| "features": { | ||
| "cpp": { | ||
| "description": "Builds Lua for C++ linkage" | ||
| }, | ||
| "tools": { | ||
| "description": "Builds Lua compiler and interpreter" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.