-
Notifications
You must be signed in to change notification settings - Fork 1
/
instant-toolchain-target.bbclass
28 lines (23 loc) · 1.11 KB
/
instant-toolchain-target.bbclass
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
#------------------------------------------------------------------------------
# class for instant toolchain
#------------------------------------------------------------------------------
inherit instant-paths
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_compile[postfuncs] += "${COMPILE_POST_TARGET}"
COMPILE_POST_TARGET = ""
COMPILE_POST_TARGET:class-target = "instant_compile_target"
INSTANTPOPULATE_TOOLCHAIN_VARS = " \
CC \
CFLAGS \
"
python instant_compile_target () {
# create sourceable script that exports variables necessary
for envvar in d.getVar('INSTANTPOPULATE_TOOLCHAIN_VARS').split():
content = d.getVar(envvar).strip()
line = 'export %s="%s"' % (envvar, content)
line = line.replace(d.getVar('DEBUG_PREFIX_MAP'),'-fdebug-prefix-map=%s= -fdebug-prefix-map=%s=' % (d.getVar('INSTANT_TARGET_PATH'), d.getVar('INSTANT_NATIVE_PATH') ))
line = line.replace(d.getVar('STAGING_DIR_NATIVE'),d.getVar('INSTANT_NATIVE_PATH'))
line = line.replace(d.getVar('STAGING_DIR_HOST'),d.getVar('INSTANT_TARGET_PATH'))
print(line)
print(d.getVar('DEBUG_PREFIX_MAP'))
}