Skip to content

Commit d0b961f

Browse files
committed
[GR-69678] Enterprise polyglot uses polyglot isolate resource for wrong platform.
PullRequest: graal/22138
2 parents 9a2d042 + 7f1b0ab commit d0b961f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

truffle/mx.truffle/mx_truffle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,8 +1521,8 @@ def build(self):
15211521
subst_eng.register_no_arg('languageId', prj.language_id)
15221522
subst_eng.register_no_arg('languageIds', ', '.join([f'"{l}"' for l in prj.all_language_ids]))
15231523
subst_eng.register_no_arg('resourceId', prj.resource_id)
1524-
subst_eng.register_no_arg('os', prj.os_name)
1525-
subst_eng.register_no_arg('arch', prj.cpu_architecture)
1524+
subst_eng.register_no_arg('OS', prj.os_name.upper())
1525+
subst_eng.register_no_arg('CPUArchitecture', prj.cpu_architecture.upper())
15261526
file_content = subst_eng.substitute(file_content)
15271527
target_file = _PolyglotIsolateResourceBuildTask._target_file(prj.source_gen_dir(), pkg_name)
15281528
mx_util.ensure_dir_exists(dirname(target_file))

truffle/mx.truffle/polyglot_isolate_resource.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ package <package>;
4242

4343
import com.oracle.truffle.api.CompilerDirectives;
4444
import com.oracle.truffle.api.InternalResource;
45+
import com.oracle.truffle.api.InternalResource.CPUArchitecture;
46+
import com.oracle.truffle.api.InternalResource.OS;
4547

4648
import com.oracle.truffle.polyglot.enterprise.isolate.PolyglotIsolateLanguages;
4749

4850
import java.io.IOException;
4951
import java.nio.file.Path;
5052

5153
@InternalResource.Id(value = PolyglotIsolateResource.ID, componentId = "engine", optional = true)
52-
@PolyglotIsolateLanguages({<languageIds>})
54+
@PolyglotIsolateLanguages(value={<languageIds>}, os=OS.<OS>, cpuArchitecture=CPUArchitecture.<CPUArchitecture>)
5355
public final class PolyglotIsolateResource implements InternalResource {
5456

5557
static final String ID = "<resourceId>";

0 commit comments

Comments
 (0)