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

Android module changes, stage 1 [defunct] #1263

Closed
wants to merge 1 commit into from
Closed

Android module changes, stage 1 [defunct] #1263

wants to merge 1 commit into from

Conversation

ifarbod
Copy link
Contributor

@ifarbod ifarbod commented Mar 28, 2019

As discussed in #1251, this is a PR that contains merely fixes and minor changes, I'll do the second PR with the new functions and features once this gets merged.

Here's a quick brief of what I did:

  • Reworked the stl API, using staticruntime to decide on shared/static.
stl "libc++"
staticruntime "On"
-- Would produce: "c++_static"
-- Or:
stl "gnustl"
staticruntime "Off"
-- Would produce: "gnustl_shared"
  • Fixed the MultiProcessorCompilation flag.
  • Renamed androidproj to Packaging.
  • Prevented some Windows-exclusive attributes from ending up in Android projects, such as CharacterSet.
  • Added NEON support for vectorextensions.
  • Added UnwindTables support for exceptionhandling.
  • Fixed targetName not working in Packaging projects.
  • Included Android fixes from bliz #1112 (minus the unit tests) which fixes disablewarnings, exceptionhandling and rtti.
  • Unify cppdialect and cdialect, added support for C++latest which maps to C++17 at the moment.
  • Fixed pic.
  • Fixed thumbmode.

@ifarbod
Copy link
Contributor Author

ifarbod commented Mar 28, 2019

Looks like some of the tests are failing, is the order of these really important?

stack traceback:
	...make-core/modules/android/tests/test_android_project.lua:35: in function 'testFunction'
[  FAILED  ] test_android_project.rttiOn
...make-core/modules/android/tests/test_android_project.lua:46: (4) expected:
	<ExceptionHandling>Enabled</ExceptionHandling>
...but was:
	<RuntimeTypeInfo>true</RuntimeTypeInfo>
fulltext:
<ClCompile>
	<PrecompiledHeader>NotUsing</PrecompiledHeader>
	<Optimization>Disabled</Optimization>
	<RuntimeTypeInfo>true</RuntimeTypeInfo>
</ClCompile>

@WorldofBay
Copy link
Contributor

WorldofBay commented Mar 28, 2019

the other wrong test aren't because of order but because of default values in _premake-init.lua

both rtti and exceptionhandling are set to "Default" if not specified.

if the new behaviour is better you need to edit the tests.
i have no idea why the current test suite.exceptionHandlingOff has no rtti set as it should get from the defaults but for the rest the defaults seem to trigger if any configuration is done.

premake.override(vc2010, "runtimeTypeInfo", function(oldfn, cfg, condition)
if cfg.system == premake.ANDROID then
-- Note: Android defaults to 'off'
if cfg.rtti then
if cfg.rtti and cfg.rtti ~= premake.OFF then
Copy link
Contributor

Choose a reason for hiding this comment

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

rtti, if not set, defaults to "Default" which will be a true here, while the comment says the default is off, so false.

i don't know which one is correct but either the comment is wrong or you need to add a check for "Default".

also you'll need to change almost every test in the test_android_project suite to look for the correct behaviour for both rtti and exceptionhandling.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this bit is from @TurkeyMan's PR.

modules/android/_preload.lua Show resolved Hide resolved
@WorldofBay
Copy link
Contributor

the rest looks clean but since i know what sam will say i can say it now before he reads it, so you're already done by then:
once you're finished, squash those commits into a single one

@ifarbod
Copy link
Contributor Author

ifarbod commented Mar 28, 2019

Thanks for the quick reviews, will do once I figure out the rest of the unit test issues

@ifarbod
Copy link
Contributor Author

ifarbod commented Mar 28, 2019

@WorldofBay All of the tests pass now. (the GCC builds on Travis didn't start for some reason)
I'll squash my commits into one if everything else is okay.

@ifarbod
Copy link
Contributor Author

ifarbod commented Mar 28, 2019

I messed up my local checkout beyond repair after squashing with premake-core's changes from master, I don't like having a lot of merge commits so here's another PR: #1264

@ifarbod ifarbod closed this Mar 28, 2019
@ifarbod ifarbod changed the title Android module changes, stage 1 Android module changes, stage 1 [defunct] Mar 28, 2019
samsinsane added a commit that referenced this pull request Apr 4, 2019
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.

2 participants