-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAndroid.d8.mk
52 lines (37 loc) · 1.27 KB
/
Android.d8.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/Android.v8common.mk
LOCAL_MODULE := d8
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_SRC_FILES := \
src/d8.cc \
src/d8-posix.cc
LOCAL_JS_D8_FILES := \
$(LOCAL_PATH)/src/d8.js \
$(LOCAL_PATH)/src/js/macros.py
generated_sources := $(call local-generated-sources-dir)
# Copy js2c.py to generated sources directory and invoke there to avoid
# generating jsmin.pyc in the source directory
JS2C_PY := $(generated_sources)/js2c.py $(generated_sources)/jsmin.py
$(JS2C_PY): $(generated_sources)/%.py : $(LOCAL_PATH)/tools/%.py | $(ACP)
@echo "Copying $@"
$(copy-file-to-target)
# Generate d8-js.cc
D8_GEN := $(generated_sources)/d8-js.cc
$(D8_GEN): SCRIPT := $(generated_sources)/js2c.py
$(D8_GEN): $(LOCAL_JS_D8_FILES) $(JS2C_PY)
@echo "Generating d8-js.cc"
@mkdir -p $(dir $@)
python $(SCRIPT) $@ D8 $(LOCAL_JS_D8_FILES)
LOCAL_GENERATED_SOURCES += $(D8_GEN)
LOCAL_STATIC_LIBRARIES := libv8
LOCAL_SHARED_LIBRARIES := liblog libicuuc libicui18n
LOCAL_MODULE_TAGS := optional
LOCAL_CFLAGS += \
-O0
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include
# Bug: http://b/31101212 WAR LLVM bug until next Clang update
LOCAL_CFLAGS_mips += -O2
LOCAL_MODULE_TARGET_ARCH_WARN := $(V8_SUPPORTED_ARCH)
include $(BUILD_EXECUTABLE)