Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
leleliu008 committed Jul 11, 2024
1 parent a90d8d6 commit bd14c7f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ndk-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -5983,7 +5983,7 @@ $DOT_CONTENT

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

step "locate build tools"
step "locate needed tools"

unset AUTORECONF
unset AUTOCONF
Expand Down
16 changes: 8 additions & 8 deletions wrapper-target-c++.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <sys/stat.h>

#define ACTION_PREPROCESS 1
#define ACTION_ASSEMBLE 2
#define ACTION_COMPILE 3
#define ACTION_COMPILE 2
#define ACTION_ASSEMBLE 3
#define ACTION_CREATE_SHARED_LIBRARY 4
#define ACTION_CREATE_STATICALLY_LINKED_EXECUTABLE 5

Expand Down Expand Up @@ -52,12 +52,12 @@ int main(int argc, char * argv[]) {
}

if (strcmp(argv[i], "-S") == 0) {
action = ACTION_ASSEMBLE;
action = ACTION_COMPILE;
break;
}

if (strcmp(argv[i], "-c") == 0) {
action = ACTION_COMPILE;
action = ACTION_ASSEMBLE;
break;
}

Expand All @@ -66,11 +66,11 @@ int main(int argc, char * argv[]) {
break;
}

if (strcmp(argv[i], "-static") == 0) {
staticFlag = 1;
if (staticFlag == 1) {
continue;
}

if (strcmp(argv[i], "--static") == 0) {
if (strcmp(argv[i], "-static") == 0 || strcmp(argv[i], "--static") == 0) {
staticFlag = 1;
}
}
Expand Down Expand Up @@ -316,7 +316,7 @@ int main(int argc, char * argv[]) {

/////////////////////////////////////////////////////////////////

if (action == ACTION_CREATE_SHARED_LIBRARY) {
if (action == ACTION_ASSEMBLE || action == ACTION_CREATE_SHARED_LIBRARY) {
argv2[argc++] = (char*)"-fPIC";

if (sonameArg[0] != '\0') {
Expand Down
16 changes: 8 additions & 8 deletions wrapper-target-cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <sys/stat.h>

#define ACTION_PREPROCESS 1
#define ACTION_ASSEMBLE 2
#define ACTION_COMPILE 3
#define ACTION_COMPILE 2
#define ACTION_ASSEMBLE 3
#define ACTION_CREATE_SHARED_LIBRARY 4
#define ACTION_CREATE_STATICALLY_LINKED_EXECUTABLE 5

Expand Down Expand Up @@ -52,12 +52,12 @@ int main(int argc, char * argv[]) {
}

if (strcmp(argv[i], "-S") == 0) {
action = ACTION_ASSEMBLE;
action = ACTION_COMPILE;
break;
}

if (strcmp(argv[i], "-c") == 0) {
action = ACTION_COMPILE;
action = ACTION_ASSEMBLE;
break;
}

Expand All @@ -66,11 +66,11 @@ int main(int argc, char * argv[]) {
break;
}

if (strcmp(argv[i], "-static") == 0) {
staticFlag = 1;
if (staticFlag == 1) {
continue;
}

if (strcmp(argv[i], "--static") == 0) {
if (strcmp(argv[i], "-static") == 0 || strcmp(argv[i], "--static") == 0) {
staticFlag = 1;
}
}
Expand Down Expand Up @@ -316,7 +316,7 @@ int main(int argc, char * argv[]) {

/////////////////////////////////////////////////////////////////

if (action == ACTION_CREATE_SHARED_LIBRARY) {
if (action == ACTION_ASSEMBLE || action == ACTION_CREATE_SHARED_LIBRARY) {
argv2[argc++] = (char*)"-fPIC";

if (sonameArg[0] != '\0') {
Expand Down

0 comments on commit bd14c7f

Please sign in to comment.