Commit Graph

762 Commits

Author SHA1 Message Date
Panayotis Katsaloulis
c105c32453 Support of latest iOS version 2016-09-21 21:00:12 +03:00
Joel Dice
a2c0319af2 Merge pull request #495 from joshuawarner32/master
Fix ios bootimage build
2016-08-12 11:57:00 -06:00
Joshua Warner
559a6d2bd4 fix ios bootimage build 2016-08-12 17:35:34 +00:00
Joshua Warner
8c84b94416 use $(so-prefix) and $(so-suffix) for libjvm 2016-08-12 17:35:16 +00:00
Joel Dice
ad7ad4e512 get netinet headers from iPhoneSimulator SDK, not iPhoneOS SDK
As of SDK 9.2 at least, the headers we need are not part of the device
SDK, only the simulator SDK.
2016-08-12 10:05:37 -06:00
Joel Dice
8ca9bff2e5 fix timestamp-related bug in makefile
Prior to this commit, we had a little bit of "cleverness" wherein we
recursively invoked make to determine which of the .class files in the
class library were out of date with respect to their .java files.  We
did this to avoid asking javac to recompile everything every time.

The problem with that is when building against an alternative class
library (e.g. OpenJDK or Android), we use a combination of classes
from the alternative library and some of the built-in Avian classes
(e.g. java/lang/invoke/MethodHandle, which is very closely tied to the
VM).  This confuses the build process, since some of the classes were
taken from an external jar, and some of them were built from source.

The tricky bit is that, depending on the relative timestamps of the
extracted .class files and the .java source files, you might never see
the problem.  That's why I couldn't reproduce this when it was first
reported a few months ago: my source files were newer than the .class
files from the OpenJDK jars I was using, so the Avian versions were
built and used as intended.  It was only later when I used a newer
OpenJDK that I hit the problem.

Anyway, I've removed the cleverness.  If this causes an unreasonable
regression in (re)build times, we can try to reintroduce it in a way
that avoids the above problem, but for now simpler is better.
2016-06-21 16:34:45 -06:00
Joel Dice
08982cc9ed Merge pull request #480 from dicej/ios
update to iOS 9.2 SDK and define sysroot for iOS
2016-05-14 13:18:48 -06:00
Ilya Mizus
02fedde306 Added support for MSYS2 with mingw-w64 toolchain 2016-04-28 11:03:52 +03:00
Joel Dice
b999772838 Revert "drop MSYS build support"
This reverts commit d930f41d7e.

Turns out the avian-pack project really needs MSYS support, so I'm
reverting this.
2016-04-26 19:06:25 -06:00
Joel Dice
d930f41d7e drop MSYS build support
Per a recent request for help on the Google group, I spent some time
this past weekend trying to debug the MSYS build.  The conclusion I
came to is that MSYS is not worth supporting anymore.  The most recent
release is almost three years old, and I've been unable to find any
variant with a 64-bit-target compiler that will actually install.  If
someone else cares enough about building Avian on MSYS to maintain it
themselves, patches are welcome.

Meanwhile, let's all just use Cygwin.  Perhaps someone will build a
cool package manager on top of WSL and suddenly make both Cygwin and
MSYS obsolete.
2016-04-25 09:02:35 -07:00
Joel Dice
0ab8235237 streamline SDK search in makefile 2016-04-06 07:40:49 -06:00
Joel Dice
18b27c9436 update to iOS 9.2 SDK and define sysroot for iOS
Previously, we only seemed to define sysroot for MacOS, not iOS, yet
we reference $(sysroot) in both cases.  This ensures it is defined in
both cases as well.
2016-04-04 11:55:03 -06:00
Joel Dice
3247093b10 disable -Werror by default (but still use it for continuous integration)
Since we can't predict what warnings future compilers will emit, and
most people just want to build Avian without some new warning tripping
it up, we now omit -Werror unless requested via the "use-werror=true"
option to make.  Note that we pass "use-werror=true" in test/ci.sh to
ensure Travis alerts us to new warnings as they appear.

BTW, sorry about the unrelated whitespace changes in this patch; I've
got Emacs set up to fix whitespace "problems" on save, and those are
what it found.
2016-02-15 15:48:30 -07:00
Joel Dice
451700fad7 Merge pull request #473 from joshuawarner32/master
disable Trace test for PR builds, since it fails so often (and we haven't gotten around to debugging it)
2016-01-13 15:12:28 -07:00
Joshua Warner
c1b5104e79 disable Trace test for PR builds, since it fails so often (and we haven't gotten around to debugging it) 2016-01-13 20:23:15 +00:00
Joel Dice
dab9bb7d1f replace preprocessor __try/__except hack with patch 2016-01-13 09:47:52 -08:00
Joel Dice
10eecce9cf add OSX 10.10 and 10.11 to SDK search list 2016-01-13 09:03:48 -07:00
Joel Dice
80dc32094f fix openjdk/openjdk-src builds for latest JDKs 7 and 8
The tower of patches and hacks grows higher.  Ideally, we'll just drop
support for JDK 7 soon and clean this mess up a bit, but TravisCI
still hasn't gotten the memo that it's dead, so we muddle onward.

I've tested this on Windows, but not yet Linux or OS X.  Wanted to get
a PR before I move on to that.
2016-01-12 16:37:03 -08:00
Benjamin Stadin
dc010f9a92 - fixed building for iOS 9
- handle sim flag to better distinguish between ios simulator / ios
- added ios_deployment_target to set ios min version
- default to 64 bit build for iOS
2015-11-01 20:36:47 +01:00
Joel Dice
b351c9d961 exit with error if bootimage-test=true specified without bootimage=true 2015-10-20 09:40:26 -06:00
Joel Dice
9abba8fe24 add bootimage-test option to makefile
This option specifies that the test classes should be AOT-compiled
along with the class library, which allows us to test that everything
works in AOT-compiled form as well as JIT-compiled form.  This is
primarily motivated by the need to test d906db6 (support for
AOT-compilation of Java 8 lambda expressions).

Note that I had to tweak Misc because it tested something that
couldn't be done in an AOT build without a lot of extra work, and
SystemClassLoader.getPackage because it was returning null when the
requested package could not be populated with JAR manifest metadata.
Technically, we probably *should* return null for packages that don't
exist at all (in the sense that no classes have been loaded from such
a package), but tracking that kind of thing seems like more trouble
than it's worth unless someone complains about it.
2015-10-19 15:10:53 -06:00
Joshua Warner
d906db633c Merge pull request #454 from dicej/aot-lambda
support AOT-compilation of Java 8 lambda expressions
2015-09-28 07:44:51 -06:00
Joel Dice
d5a5b5309a support AOT-compilation of Java 8 lambda expressions
These expressions are tricky because they rely on invokedynamic, which
normally implies runtime code generation.  However, since lambdas
don't actually use the "dynamicness" of invokedynamic, we can convert
them into static calls to synthetic classes at compile time.

Since I had already written code to synthesize such classes in Java
and I didn't want to rewrite it in C++, I needed to add support for
running Java code to the bootimage generator.  And since the primary
VM used by the generator is purpose-built to generate AOT-compiled
code for a specific target architecture and is not capable of
generating or running JIT-compiled code for the host architecture, I
added support for loading a second, independent, host-specific VM for
running Java code.

The rest of the patch handles the fact that each method compilation
might cause new, synthetic classes to be created, so we need to make
sure those classes and their methods are included in the final heap
and code images.  This required breaking some giant code blocks out of
makeCodeImage into their own methods, which makes the diff look
scarier than it really is.
2015-09-13 14:21:24 -06:00
Joel Dice
c1df8b949c Merge pull request #446 from bgould/master
Added targets for Eclipse environment descriptor.
2015-09-13 14:15:18 -06:00
Joel Dice
549810deba allow building with Java 7 2015-08-06 17:23:14 -06:00
Joel Dice
8a7944d25c add support for openjdk=$JDK8_HOME
All tests pass for the process=compile build.  Next step: process=interpret.
2015-08-06 13:30:18 -06:00
joshuawarner32@gmail.com
792684b935 first pass at minimal invokedynamic support for Java 8 lambdas
This is a bunch of commits squashed into one per Josh's request.

add dynamicTable field

add invokedynamic instruction

add defaultDynamic bootimage field

add dummy invokedynamic support in bootimage-generator

add defaultDynamic thunk

check dynamicTable offset

comment defaultDynamicThunk to fix unused function

comment defaultDynamicThunk to fix unused function

add dynamicTable / dynamicIndex stuff

comment dynamicIndex and dynamicTable

add invokedynamic instruction impl

stub out addDynamic

unstub addDynamic

don't allow tail calls in invokedynamic

implement stub JVM_GetTemporaryDirectory method

(build broken) begin add InvokeDynamicTest

Revert "(build broken) begin add InvokeDynamicTest"

This reverts commit 77f9c54e32ac66d0803eeab93e4a10d3541987a8.

add InternalError

add URLClassPath.c for openjdk-src builds

implement stub JVM_KnownToNotExist and JVM_GetResourceLookupCache methods

intercept open0 / open for openjdk

add basic java/lang/invoke stubs

remove non-public java/lang/invoke classes

fix invokedynamic example building

<wip debugging>
2015-08-06 13:30:05 -06:00
BCG
bbcb4cb119 Fixed src symlink in eclipse config to actually point to source. 2015-07-16 23:59:27 -04:00
BCG
0a11724f15 Added targets for Eclipse environment descriptor.
Someone on the Google Groups site asked how to set up an Eclipse
project with Avian classpath. This patch creates the descriptor
that you can you use to do that at `$(build)/eclipse/jdk/avian.ee`.
The descriptor includes the Avian version, platform, architecture,
and build options to allow for multiple versions to exist side by
side.  Users can import the descriptor into Eclipse via:

    Window >> Preferences >> Java >> Installed JREs >> Add >> Execution
    Environment Description

Once the descriptor is imported, Avian can be used just like any other
JVM installation for Eclipse projects. Personally I use this in
conjunction with Eclim to gain code completion for Avian in vim.

The new targets also create symlinks to loosely mimic OpenJDK's
filenames and folder layout:

    build/linux-x86_64-tails-continuations/eclipse/jdk/
    ├── avian.ee
    ├── bin
    │   └── java -> ../../../avian
    ├── jre
    │   └── lib
    │       └── rt.jar -> ../../../../classpath.jar
    └── src -> ../../classpath

Annoyingly, Eclipse for some reason expects this layout to exist
even though the descriptor format has required parameters for
specifying these locations. I suppose that other software may
look for this "standard" layout in a JVM installation so it may be
generally useful.

These artifacts are only built if the platform is one of `windows`,
`linux`, or `macosx`. The symlinks might not actually work at all on
Windows, I'm not sure how things like cygwin/msys handle that and I
do not have the means to test it. If they do not work a fallback
for windows might be to actually copy the files instead of symlinking.

I realize this can be done outside of the makefile but it seemed
useful to put it here to gain access to the information about the
build location, platform, architecture, and other build options.

For the record, this contribution is my original work and is released
under the same license that Avian uses, found in the license.txt
file in this repository.
2015-07-16 11:00:26 -04:00
Ilya Mizus
0f40ac78a8 Fixes for avian-pack 2015-06-03 00:01:03 +03:00
Joshua Warner
b6ed0e9473 Merge pull request #428 from ReadyTalk/sgoings
add support for LZMA-enabled artifacts
2015-06-02 15:23:19 +00:00
Joel Dice
3b9089e265 Merge pull request #431 from joshuawarner32/all-heapdump
Always include heapdump code
2015-05-04 08:01:03 -06:00
joshuawarner32@gmail.com
1aca664d67 remove unused AVIAN_PROCESS preprocessor define 2015-05-03 13:25:21 -06:00
joshuawarner32@gmail.com
6be30bdaf6 always include heapdump code, to eliminate one dimension of the build matrix 2015-05-01 20:11:11 -06:00
Joshua Warner
b950d8eea8 add sdk 8.3 support 2015-05-01 13:02:52 -06:00
Joel Dice
8022bd9733 expand support for publishing LZMA artifacts 2015-04-07 16:55:45 -06:00
Joel Dice
575f595292 add support for iOS/x86_64 2015-03-16 11:39:08 -06:00
Joel Dice
93a4702de9 delete lib dir in clean target 2015-03-16 10:39:11 -06:00
Joel Dice
b35f236066 delete cmake-build and distrib in clean target 2015-03-13 15:21:29 -06:00
Joel Dice
b777f0b4a2 fix Cygwin build
80ce92a introduced a regression which caused the Cygwin build to fail,
since it tried to set platform=$(build-platform) when calling make
recursively, and platform=cygwin is rejected by the makefile.
Instead, we need to use $(bootimage-platform), which normalizes
"cygwin" and "mingw32" to "windows".
2015-01-22 09:57:15 -07:00
Ilya Mizus
89ab73c7e2 Merge branch 'master' of https://github.com/ReadyTalk/avian into avian-pack 2015-01-17 18:34:21 +03:00
Joel Dice
80ce92a999 fix iOS ARM64 build 2014-12-30 17:03:58 -07:00
Joshua Warner
f8b9fcf198 split asm files by architecture (x86 -> i386,x86_64 ; arm -> arm,arm64) 2014-12-10 15:14:18 -07:00
Joshua Warner
5e0f7590d9 fix process=interpret build for 'arch=arm64 platform=ios' 2014-12-09 14:56:59 -07:00
Joshua Warner
01de3d9d5c remove lingering 32-count limits on registers, refactor iteration, improve constants, ... 2014-12-09 11:18:00 -07:00
Joshua Warner
a2b4d3cb7c add support for 8.1 SDK 2014-12-05 14:08:27 -07:00
Joshua Warner
2762f01199 fix #373 (makefile syntax on mac) 2014-11-26 20:06:00 -07:00
Joel Dice
d52d0f6d96 add process=interpret support for Linux/ARM64
This makes all the tests pass for the platform=linux arch=arm64
process=interpret build.  Next step: process=compile support.
2014-11-25 20:02:59 -07:00
Ilya Mizus
8bcdf63b92 Merge commit '66f1b7cf8fb45a25323198ad0f95ccb74721e26d' into avian-pack 2014-11-23 12:55:31 +03:00
Ilya Mizus
a794294985 Makefile improvement to support okhttp, and Bouncy Castle for Android version 2014-11-23 12:55:09 +03:00