Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ordering of libraries for Android #33

Merged
merged 3 commits into from
Mar 24, 2017
Merged

Added ordering of libraries for Android #33

merged 3 commits into from
Mar 24, 2017

Conversation

mathiaswking
Copy link
Contributor

Fixed issue when build.zip was removed from build cache
Fixed local server builds
Fixed android builds with no jars

Fixed issue when build.zip was removed from build cache
Fixed local server builds
Fixed android builds with no jars
if (extJars.isEmpty()) {
return null;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If building with no jar files

buildEngine(request, response, platform, null);
return;
}

throw new ExtenderException("No SDK version specified.");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When building with local server, I kept hitting this exception :)

this.defoldSha1 = defoldSha1;
this.platform = platform;
this.runTestClassesDex = runTestClassesDex;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easier to see and debug when each test has version and platform already setup.

File cachedBuild = new File(String.format("build/%s/build.zip", configuration.platform));
if (cachedBuild.exists())
cachedBuild.delete();
assertFalse(cachedBuild.exists());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beware of cached builds!

@@ -70,6 +70,6 @@ platforms:
allowedLibs: ["gnustl_static","supc\\+\\+","c","m","m_hard","stdc\\+\\+",]
allowedFlags: ["-Wa,{{comma_separated_arg}}","-W{{warning}}","-ansi","--ansi","-std-default={{arg}}","-stdlib=(libstdc\\+\\+|libc\\+\\+)","-w","-std=(c89|c99|c\\+\\+0x|c\\+\\+11|c\\+\\+14|c\\+\\+17)","-Wp,{{comma_separated_arg}}","-W{{warning}}","--extra-warnings","--warn-{{warning}}","--warn-={{warning}}","-ferror-limit={{number}}","-O([0-4]?|fast|s|z)"]
compileCmd: 'arm-linux-androideabi-g++ -c -g -gdwarf-2 -fpic -ffunction-sections -fstack-protector -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -funwind-tables --sysroot={{android_sysroot}} -DANDROID -Wa,--noexecstack {{#defines}}-D{{.}} {{/defines}} {{#ext.includes}}-I{{.}} {{/ext.includes}} {{#includes}}-I{{.}} {{/includes}} {{#platformIncludes}}-I{{.}} {{/platformIncludes}} {{src}} -o{{tgt}}'
linkCmd: 'arm-linux-androideabi-g++ --sysroot={{android_sysroot}} -lEGL -lGLESv1_CM -lGLESv2 {{#src}}{{.}} {{/src}} -o {{tgt}} -Wl,-soname=libdmengine.so {{#defines}}-D{{.}} {{/defines}} -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -landroid -fpic -z text {{#ext.libPaths}}-L{{.}} {{/ext.libPaths}} -Wl,-Bstatic {{#ext.libs}}-l{{.}} {{/ext.libs}} {{#libPaths}}-L{{.}} {{/libPaths}} -Wl,-Bstatic {{#engineLibs}}-l{{.}} {{/engineLibs}} -Wl,-Bdynamic -lOpenSLES -lm -llog -lc -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -shared'
linkCmd: 'arm-linux-androideabi-g++ --sysroot={{android_sysroot}} -lEGL -lGLESv1_CM -lGLESv2 {{#src}}{{.}} {{/src}} -o {{tgt}} -Wl,-soname=libdmengine.so {{#defines}}-D{{.}} {{/defines}} -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -landroid -fpic -z text {{#ext.libPaths}}-L{{.}} {{/ext.libPaths}} -Wl,-Bstatic -Wl,--start-group {{#ext.libs}}-l{{.}} {{/ext.libs}} -Wl,--end-group {{#libPaths}}-L{{.}} {{/libPaths}} -Wl,-Bstatic {{#engineLibs}}-l{{.}} {{/engineLibs}} -Wl,-Bdynamic -lOpenSLES -lm -llog -lc -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -shared'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added "-Wl,--start-group" and "-Wl,--end-group" and it actually seemed to work. Did not manage to create a unit test for it though.

@mathiaswking mathiaswking merged commit a174609 into master Mar 24, 2017
@mathiaswking mathiaswking deleted the def2541 branch March 24, 2017 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant