Continue trying to make the android build smaller.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4240 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
		
							
								
								
									
										15
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								Makefile
									
									
									
									
									
								
							| @@ -16,7 +16,7 @@ CFLAGS += \ | ||||
| 	-MMD \ | ||||
| 	-ffunction-sections \ | ||||
| 	-fdata-sections \ | ||||
| 	-fno-omit-frame-pointer \ | ||||
| 	-fno-exceptions \ | ||||
| 	-g | ||||
| LDFLAGS += -Wl,--gc-sections | ||||
|  | ||||
| @@ -51,8 +51,13 @@ ANDROID_RELEASE_TARGETS := $(filter-out $(DEBUG_TARGETS),$(ANDROID_TARGETS)) | ||||
| NONANDROID_RELEASE_TARGETS := $(filter-out $(ANDROID_ARM64_TARGETS),$(RELEASE_TARGETS)) | ||||
| NONANDROID_TARGETS := $(filter-out $(ANDROID_TARGETS),$(DEBUG_TARGETS) $(RELEASE_TARGETS)) | ||||
|  | ||||
| debug release out/androidrelease/tildefriends out/androidrelease-x86_64/tildefriends: LDFLAGS += -rdynamic | ||||
| $(ANDROID_TARGETS): CFLAGS += --sysroot $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC | ||||
| $(NONANDROID_TARGETS): CFLAGS += -fno-omit-frame-pointer | ||||
| $(NONANDROID_TARGETS): LDFLAGS += -rdynamic | ||||
| $(ANDROID_TARGETS): CFLAGS += \ | ||||
| 	--sysroot $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/sysroot \ | ||||
| 	-fPIC \ | ||||
| 	-fomit-frame-pointer \ | ||||
| 	-fno-asynchronous-unwind-tables | ||||
| $(ANDROID_TARGETS): LDFLAGS += --sysroot $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC | ||||
| $(DEBUG_TARGETS): CFLAGS += -DDEBUG -Og | ||||
| $(RELEASE_TARGETS): CFLAGS += -DNDEBUG | ||||
| @@ -256,8 +261,10 @@ $(SQLITE_OBJS): CFLAGS += \ | ||||
| 	-DSQLITE_DBCONFIG_DEFAULT_DEFENSIVE \ | ||||
| 	-DSQLITE_DEFAULT_MEMSTATUS=0 \ | ||||
| 	-DSQLITE_DQS=0 \ | ||||
| 	-DSQLITE_ENABLE_MEMSYS5 \ | ||||
| 	-DSQLITE_ENABLE_FTS5 \ | ||||
| 	-DSQLITE_ENABLE_JSON1 \ | ||||
| 	-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \ | ||||
| 	-DSQLITE_MAX_ATTACHED=0 \ | ||||
| 	-DSQLITE_MAX_COLUMN=100 \ | ||||
| 	-DSQLITE_MAX_COMPOUND_SELECT=300 \ | ||||
| @@ -273,6 +280,7 @@ $(SQLITE_OBJS): CFLAGS += \ | ||||
| 	-DSQLITE_OMIT_DESERIALIZE \ | ||||
| 	-DSQLITE_OMIT_LOAD_EXTENSION \ | ||||
| 	-DSQLITE_OMIT_TCL_VARIABLE \ | ||||
| 	-DSQLITE_PRAGMA_DEFAULT_WAL_SYNCHRONOUS=1 \ | ||||
| 	-DSQLITE_SECURE_DELETE \ | ||||
| 	-DSQLITE_THREADSAFE=0 \ | ||||
| 	-DSQLITE_UNTESTABLE \ | ||||
| @@ -299,7 +307,6 @@ QUICKJS_SOURCES := \ | ||||
| 	deps/quickjs/libbf.c \ | ||||
| 	deps/quickjs/libregexp.c \ | ||||
| 	deps/quickjs/libunicode.c \ | ||||
| 	deps/quickjs/quickjs-libc.c \ | ||||
| 	deps/quickjs/quickjs.c | ||||
| QUICKJS_OBJS := $(call get_objs,QUICKJS_SOURCES) | ||||
| $(QUICKJS_OBJS): CFLAGS += \ | ||||
|   | ||||
| @@ -12,11 +12,11 @@ | ||||
|  | ||||
| #include <backtrace.h> | ||||
| #include <memcheck.h> | ||||
| #include <quickjs-libc.h> | ||||
| #include <quickjs.h> | ||||
| #include <sqlite3.h> | ||||
| #include <xopt.h> | ||||
|  | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
|  | ||||
| #if !defined(_WIN32) && !defined(__MACH__) | ||||
| @@ -139,6 +139,7 @@ void shedPrivileges() | ||||
|  | ||||
| static int _tf_command_test(const char* file, int argc, char* argv[]) | ||||
| { | ||||
| #if !defined(__ANDROID__) | ||||
| 	typedef struct args_t { | ||||
| 		const char* tests; | ||||
| 		bool help; | ||||
| @@ -177,6 +178,7 @@ xopt_help: | ||||
| 	{ | ||||
| 		free((void*)extras); | ||||
| 	} | ||||
| #endif | ||||
| 	return 1; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -6,11 +6,10 @@ | ||||
| #include "trace.h" | ||||
| #include "util.js.h" | ||||
|  | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #include "quickjs-libc.h" | ||||
|  | ||||
| #include <assert.h> | ||||
|  | ||||
| typedef enum _serialize_type_t { | ||||
|   | ||||
| @@ -10,8 +10,6 @@ | ||||
| #include <string.h> | ||||
| #include <uv.h> | ||||
|  | ||||
| #include "quickjs-libc.h" | ||||
|  | ||||
| typedef int promiseid_t; | ||||
| typedef struct _socket_t socket_t; | ||||
|  | ||||
|   | ||||
| @@ -21,8 +21,6 @@ | ||||
| #include <assert.h> | ||||
| #include <inttypes.h> | ||||
|  | ||||
| #include "quickjs-libc.h" | ||||
|  | ||||
| static JSClassID _tf_ssb_classId; | ||||
|  | ||||
| void _tf_ssb_on_rpc(tf_ssb_connection_t* connection, uint8_t flags, int32_t request_number, JSValue args, const uint8_t* message, size_t size, void* user_data); | ||||
|   | ||||
| @@ -14,8 +14,6 @@ | ||||
| #include <time.h> | ||||
| #include <uv.h> | ||||
|  | ||||
| #include "quickjs-libc.h" | ||||
|  | ||||
| void tf_ssb_test_id_conversion(const tf_test_options_t* options) | ||||
| { | ||||
| 	tf_printf("Testing id conversion.\n"); | ||||
| @@ -114,11 +112,7 @@ static void _ssb_test_idle(uv_idle_t* idle) | ||||
| 		{ | ||||
| 			tf_util_report_error(context, result); | ||||
| 		} | ||||
| 		if (r < 0) | ||||
| 		{ | ||||
| 			js_std_dump_error(context); | ||||
| 		} | ||||
| 		else if (r == 0) | ||||
| 		if (r == 0) | ||||
| 		{ | ||||
| 			break; | ||||
| 		} | ||||
|   | ||||
							
								
								
									
										10
									
								
								src/task.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/task.c
									
									
									
									
									
								
							| @@ -27,7 +27,6 @@ | ||||
| #include "unzip.h" | ||||
|  | ||||
| #include "quickjs.h" | ||||
| #include "quickjs-libc.h" | ||||
|  | ||||
| #include <backtrace.h> | ||||
|  | ||||
| @@ -1449,14 +1448,7 @@ static bool _tf_task_run_jobs(tf_task_t* task) | ||||
| 			tf_util_report_error(context, result); | ||||
| 			JS_FreeValue(context, result); | ||||
| 		} | ||||
| 		if (r < 0) | ||||
| 		{ | ||||
| 			js_std_dump_error(context); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return r != 0; | ||||
| 		} | ||||
| 		return r != 0; | ||||
| 	} | ||||
| 	return 0; | ||||
| } | ||||
|   | ||||
| @@ -10,8 +10,6 @@ | ||||
| #include <string.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #include "quickjs-libc.h" | ||||
|  | ||||
| #ifdef _WIN32 | ||||
| #include <io.h> | ||||
| #include <windows.h> | ||||
|   | ||||
| @@ -9,7 +9,6 @@ | ||||
| #include <openssl/crypto.h> | ||||
| #include <openssl/sha.h> | ||||
| #include <picohttpparser.h> | ||||
| #include <quickjs-libc.h> | ||||
| #include <sodium/utils.h> | ||||
| #include <uv.h> | ||||
|  | ||||
| @@ -176,19 +175,13 @@ bool tf_util_report_error(JSContext* context, JSValue value) | ||||
| 		JS_FreeValue(context, stack); | ||||
|  | ||||
| 		tf_task_t* task = tf_task_get(context); | ||||
| 		if (!task || !tf_task_send_error_to_parent(task, value)) | ||||
| 		{ | ||||
| 			js_std_dump_error(context); | ||||
| 		} | ||||
| 		tf_task_send_error_to_parent(task, value); | ||||
| 		is_error = true; | ||||
| 	} | ||||
| 	else if (JS_IsException(value)) | ||||
| 	{ | ||||
| 		tf_task_t* task = tf_task_get(context); | ||||
| 		if (!task || !tf_task_send_error_to_parent(task, value)) | ||||
| 		{ | ||||
| 			js_std_dump_error(context); | ||||
| 		} | ||||
| 		tf_task_send_error_to_parent(task, value); | ||||
| 		is_error = true; | ||||
| 	} | ||||
| 	return is_error; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user