Mercurial > hg > graal-compiler
changeset 16720:ad19df13df14
mx: add support for Java agent libraries that use the Boot-Class-Path manifest attribute to ensure that are loaded by the boot class path loader
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 07 Aug 2014 17:32:17 +0200 |
parents | 91e7d77cfb81 |
children | 88c72965bdfa |
files | mxtool/mx.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mxtool/mx.py Thu Aug 07 08:04:23 2014 +0200 +++ b/mxtool/mx.py Thu Aug 07 17:32:17 2014 +0200 @@ -503,7 +503,7 @@ d.update(buf) return d.hexdigest() -def download_file_with_sha1(name, path, urls, sha1, sha1path, resolve, mustExist, sources=False): +def download_file_with_sha1(name, path, urls, sha1, sha1path, resolve, mustExist, sources=False, canSymlink=True): def _download_lib(): cacheDir = get_env('MX_CACHE_DIR', join(_opts.user_home, '.mx', 'cache')) if not exists(cacheDir): @@ -520,7 +520,8 @@ d = dirname(path) if d != '' and not exists(d): os.makedirs(d) - if 'symlink' in dir(os): + + if canSymlink and 'symlink' in dir(os): if exists(path): os.unlink(path) os.symlink(cachePath, path) @@ -654,7 +655,9 @@ if includedInJDK and java().javaCompliance >= JavaCompliance(includedInJDK): return None - return download_file_with_sha1(self.name, path, self.urls, self.sha1, sha1path, resolve, not self.optional) + bootClassPathAgent = self.bootClassPathAgent.lower() == 'true' if hasattr(self, 'bootClassPathAgent') else False + + return download_file_with_sha1(self.name, path, self.urls, self.sha1, sha1path, resolve, not self.optional, canSymlink=not bootClassPathAgent) def get_source_path(self, resolve): if self.sourcePath is None: