@@ -40,27 +40,7 @@ main() {
40
40
td=" $( mktemp -d) "
41
41
pushd " ${td} "
42
42
43
- # fake java and javac, it is not necessary for what we build, but the build
44
- # script asks for it
45
- cat << EOF > /usr/bin/java
46
- #!/usr/bin/env bash
47
- echo "java version \"1.7.0\""
48
- echo "OpenJDK Runtime Environment (IcedTea 2.6.9)"
49
- echo "OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)"
50
- EOF
51
-
52
- cat << EOF > /usr/bin/javac
53
- #!/usr/bin/env bash
54
- echo "javac 1.7.0"
55
- EOF
56
-
57
- chmod +x /usr/bin/java
58
- chmod +x /usr/bin/javac
59
-
60
- # more faking
61
- export ANDROID_JAVA_HOME=/tmp
62
- mkdir /tmp/lib/
63
- touch /tmp/lib/tools.jar
43
+ fake_java " ${major_version} "
64
44
65
45
install_packages ca-certificates \
66
46
curl \
98
78
6)
99
79
android_repo_v6 " ${arch} "
100
80
;;
101
- # 7)
102
- # #android_repo_v7 "${arch}"
103
- # # TODO(ahuszagh) Here.
104
- # ;;
81
+ 7)
82
+ android_repo_v7 " ${arch} "
83
+ ;;
105
84
# 8)
106
85
# #android_repo_v8 "${arch}"
107
86
# # TODO(ahuszagh) Here.
143
122
rm " ${0} "
144
123
}
145
124
125
+ fake_java () {
126
+ local major_version=" ${1} "
127
+ local java_version=
128
+ local icedtea_version=
129
+ case " ${major_version} " in
130
+ 5|6)
131
+ java_version=1.7.0
132
+ icedtea_version=2.6.9
133
+ ;;
134
+ * )
135
+ java_version=1.8.0
136
+ icedtea_version=2.6.9
137
+ ;;
138
+ esac
139
+
140
+ # fake java and javac, it is not necessary for what we build, but the build
141
+ # script asks for it
142
+ cat << EOF > /usr/bin/java
143
+ #!/usr/bin/env bash
144
+ echo "java version \"${java_version} \""
145
+ echo "OpenJDK Runtime Environment (IcedTea ${icedtea_version} )"
146
+ echo "OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)"
147
+ EOF
148
+
149
+ cat << EOF > /usr/bin/javac
150
+ #!/usr/bin/env bash
151
+ echo "javac ${java_version} "
152
+ EOF
153
+
154
+ chmod +x /usr/bin/java
155
+ chmod +x /usr/bin/javac
156
+
157
+ # more faking
158
+ export ANDROID_JAVA_HOME=/tmp
159
+ mkdir /tmp/lib/
160
+ touch /tmp/lib/tools.jar
161
+ }
162
+
146
163
build_android () {
147
164
local arch=" ${1} "
148
165
local major_version=" ${2} "
@@ -282,16 +299,59 @@ android_repo_v6() {
282
299
rm bionic/tools/relocation_packer/Android.mk
283
300
}
284
301
285
- # TODO
302
+ # TODO: tested on 7.0.0_r36 (SDK 24)
303
+ # TODO: tested on 7.1.2_r39 (SDK 25)
286
304
android_repo_v7 () {
287
305
# TODO(ahuszagh) This is the first one using the soong build system
288
306
local arch=" ${1} "
289
307
290
308
sync bionic
291
309
sync build
292
- sync prebuilts/clang/linux-x86/host/3.6
293
- # TODO(ahuszagh) Here...
294
- # TODO(ahuszagh) Having issues rn with using git directly.
310
+ sync build/kati
311
+ sync external/compiler-rt
312
+ sync external/elfutils
313
+ sync external/jemalloc
314
+ sync external/libcxx
315
+ sync external/libcxxabi
316
+ sync external/libunwind
317
+ sync external/libunwind_llvm
318
+ sync external/llvm
319
+ sync external/mksh
320
+ sync external/zlib
321
+ sync prebuilts/clang/host/linux-x86
322
+ sync prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8
323
+ sync prebuilts/ninja/linux-x86
324
+ sync system/core
325
+
326
+ case " ${arch} " in
327
+ arm)
328
+ sync prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9
329
+ ;;
330
+ arm64)
331
+ sync prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9
332
+ sync prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
333
+ ;;
334
+ x86)
335
+ sync prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
336
+ ;;
337
+ x86_64)
338
+ sync prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
339
+ ;;
340
+ esac
341
+
342
+ # avoid build tests
343
+ rm bionic/linker/tests/Android.mk
344
+ rm bionic/tests/Android.mk
345
+ rm bionic/benchmarks/Android.mk
346
+ # we don't need the relocation packer, and removing
347
+ # the unittests from it is a bit of work.
348
+ rm bionic/tools/relocation_packer/Android.mk
349
+
350
+ python3 /remove_soong_tests.py
351
+
352
+ # FIXME: 7.0.0 Currently failing with:
353
+ # ninja: error: 'out/target/product/generic_arm64/obj/STATIC_LIBRARIES/libgtest_main_intermediates/export_includes', needed by 'out/target/product/generic_arm64/obj/EXECUTABLES/malloc_debug_unit_tests_intermediates/import_includes', missing and no known rule to make it
354
+ # make: *** [build/core/ninja.mk:149: ninja_wrapper] Error 1
295
355
}
296
356
297
357
# tested on 9.0.0_r1 (SDK 28)
0 commit comments