Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
Signed-off-by: leleliu008 <leleliu008@gmail.com>
  • Loading branch information
leleliu008 committed Apr 19, 2024
1 parent 8c7ff49 commit 9e4c47b
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ a typical hierarchical structure under `~/.ndk-pkg` directory looks like below:
├── core
│   ├── SourceCodePro-Light.otf
│   ├── cacert.pem
│   ├── env.sh
│   ├── fonts.conf
│   ├── ndk-pkg-core-2024.05.15-linux-x86_64.tar.xz
│   ├── ndk-pkg-core-latest-release-version
│   ├── profile
│   ├── sed-in-place
│   ├── uppm
│   ├── wrapper-native-cc
Expand Down
7 changes: 7 additions & 0 deletions ndk-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -4382,6 +4382,13 @@ inspect_install_arguments() {

#########################################################################################

case $REQUEST_TO_CREATE_EXE_TYPE in
'') REQUEST_TO_CREATE_EXE_TYPE=pie ;;
msle) export NDKPKG_CREATE_MOSTLY_STATICALLY_LINKED_EXECUTABLE=1 ;;
esac

#########################################################################################

if [ -z "$PROFILE" ] ; then
PROFILE=release
fi
Expand Down
17 changes: 16 additions & 1 deletion wrapper-target-c++.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,22 @@ int main(int argc, char * argv[]) {
for (int j = 0; j < 6; j++) {
if (strcmp(argv[i], actions[j]) == 0) {
indexes[j] = i;
break;

if (indexes[0] > 0) {
break;
}

if (indexes[1] > 0) {
break;
}

if (indexes[2] > 0) {
break;
}

if (indexes[3] > 0) {
break;
}
}
}
}
Expand Down
17 changes: 16 additions & 1 deletion wrapper-target-cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,22 @@ int main(int argc, char * argv[]) {
for (int j = 0; j < 6; j++) {
if (strcmp(argv[i], actions[j]) == 0) {
indexes[j] = i;
break;

if (indexes[0] > 0) {
break;
}

if (indexes[1] > 0) {
break;
}

if (indexes[2] > 0) {
break;
}

if (indexes[3] > 0) {
break;
}
}
}
}
Expand Down

0 comments on commit 9e4c47b

Please sign in to comment.