Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0175e01f authored by Shih-wei Liao's avatar Shih-wei Liao
Browse files

Enable optimized bitcode that is also jitted faster.

Change-Id: I08832cfaf4e8465c16b445eeb1b82f72d874d0ef
parent 4de82c78
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -23,7 +23,13 @@ include $(BUILD_HOST_EXECUTABLE)
# TODO: This should go into build/core/config.mk
RSG_GENERATOR:=$(LOCAL_BUILT_MODULE)


include $(CLEAR_VARS)
input_data_file := $(LOCAL_PATH)/rslib.bc
slangdata_output_var_name := rs_runtime_lib_bc
LOCAL_MODULE := librslib_rt
LOCAL_MODULE_TAGS := optional
include frameworks/compile/slang/SlangData.mk
include $(BUILD_STATIC_LIBRARY)

# Build render script lib ====================

@@ -109,7 +115,7 @@ LOCAL_SRC_FILES:= \

LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc

LOCAL_STATIC_LIBRARIES := libft2
LOCAL_STATIC_LIBRARIES := libft2 librslib_rt

LOCAL_C_INCLUDES += external/freetype/include

+4 −2
Original line number Diff line number Diff line
@@ -390,6 +390,9 @@ static BCCvoid* symbolLookup(BCCvoid* pContext, const BCCchar* name)
    return NULL;
}

extern const char rs_runtime_lib_bc[];
extern unsigned rs_runtime_lib_bc_size;

void ScriptCState::runCompiler(Context *rsc, ScriptC *s)
{
    LOGV("%p ScriptCState::runCompiler ", rsc);
@@ -398,6 +401,7 @@ void ScriptCState::runCompiler(Context *rsc, ScriptC *s)
        s->mBccScript = bccCreateScript();
        s->mEnviroment.mIsThreadable = true;
        bccScriptBitcode(s->mBccScript, s->mEnviroment.mScriptText, s->mEnviroment.mScriptTextLength);
        //bccLinkBitcode(s->mBccScript, rs_runtime_lib_bc, rs_runtime_lib_bc_size);
        bccRegisterSymbolCallback(s->mBccScript, symbolLookup, s);
        bccCompileScript(s->mBccScript);
        bccGetScriptLabel(s->mBccScript, "root", (BCCvoid**) &s->mProgram.mRoot);
@@ -533,5 +537,3 @@ RsScript rsi_ScriptCCreate(Context * rsc)

}
}

libs/rs/rslib.bc

0 → 100644
+716 B

File added.

No diff preview for this file type.