From d35db4c47b6713ffe253029bf79dbc844ae32a59 Mon Sep 17 00:00:00 2001
From: Gilles Duboscq <gilles.m.duboscq@oracle.com>
Date: Tue, 13 Feb 2018 17:15:46 +0100
Subject: [PATCH] Add conditional build dependency to SULONG for
 native.recommended

---
 mx.fastr/mx_fastr.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/mx.fastr/mx_fastr.py b/mx.fastr/mx_fastr.py
index 9212dc068b..fbf291a743 100644
--- a/mx.fastr/mx_fastr.py
+++ b/mx.fastr/mx_fastr.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -530,6 +530,11 @@ def nativebuild(args):
 
 def mx_post_parse_cmd_line(opts):
     mx_fastr_dists.mx_post_parse_cmd_line(opts)
+    if _mx_sulong:
+        # native.recommended runs FastR, it already has a build dependency to the FASTR distribution
+        # if we are running with sulong we also need the SULONG distribution
+        rec = mx.project('com.oracle.truffle.r.native.recommended')
+        rec.buildDependencies += [mx.distribution('SULONG')]
 
 mx_unittest.add_config_participant(_unittest_config_participant)
 
-- 
GitLab