From 82039eea869a48d37f5a610be1a71249334a8316 Mon Sep 17 00:00:00 2001 From: Dwight Guth Date: Thu, 17 Oct 2024 11:59:33 -0500 Subject: [PATCH 1/2] add hidden visibility flag (#4666) This PR adds a flag to kompile which passes through to the llvm backend. Fairly straightforward. --- .../main/java/org/kframework/backend/llvm/LLVMBackend.java | 3 +++ .../org/kframework/backend/llvm/LLVMKompileOptions.java | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMBackend.java b/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMBackend.java index 420f6c16761..e154e7b6530 100644 --- a/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMBackend.java +++ b/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMBackend.java @@ -146,6 +146,9 @@ private void llvmKompile(String type, String executable) { if (options.llvmMutableBytes) { args.add("--mutable-bytes"); } + if (options.llvmHiddenVisibility) { + args.add("--hidden-visibility"); + } if (options.debug) { args.add("-g"); diff --git a/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMKompileOptions.java b/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMKompileOptions.java index 282b58c2f08..b330a5268a9 100644 --- a/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMKompileOptions.java +++ b/llvm-backend/src/main/java/org/kframework/backend/llvm/LLVMKompileOptions.java @@ -119,4 +119,10 @@ public List convert(String str) { description = "Use a faster, unsound representation for byte arrays on the LLVM backend", hidden = true) public boolean llvmMutableBytes; + + @Parameter( + names = "--llvm-hidden-visibility", + description = "Build the llvm backend with -fvisibility=hidden", + hidden = true) + public boolean llvmHiddenVisibility; } From 7e36761c3fb3ce02c4590a205a37fc05e93500f0 Mon Sep 17 00:00:00 2001 From: rv-jenkins Date: Thu, 17 Oct 2024 18:04:16 -0600 Subject: [PATCH 2/2] Update dependency: deps/haskell-backend_release (#4665) Co-authored-by: devops Co-authored-by: Jost Berthold --- deps/haskell-backend_release | 2 +- flake.lock | 8 ++++---- flake.nix | 2 +- haskell-backend/src/main/native/haskell-backend | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/deps/haskell-backend_release b/deps/haskell-backend_release index 2976b5a1a55..bbf629f6075 100644 --- a/deps/haskell-backend_release +++ b/deps/haskell-backend_release @@ -1 +1 @@ -v0.1.89 +v0.1.90 diff --git a/flake.lock b/flake.lock index b58f1396533..facd63ca651 100644 --- a/flake.lock +++ b/flake.lock @@ -65,16 +65,16 @@ "z3": "z3" }, "locked": { - "lastModified": 1729079440, - "narHash": "sha256-wQi5GIW51rx33FPFZE+8ug28hYhOFNmPwbwllGPOK+o=", + "lastModified": 1729168859, + "narHash": "sha256-S9Vx0p6kDorS9NwnZb+QOTGpMKXwGlchCiiow881nTs=", "owner": "runtimeverification", "repo": "haskell-backend", - "rev": "4fb57a8842d04ba0ce27393f7073feb21539118b", + "rev": "712543ed61f5ca4365b84d0f7ef6d71a35349662", "type": "github" }, "original": { "owner": "runtimeverification", - "ref": "v0.1.89", + "ref": "v0.1.90", "repo": "haskell-backend", "type": "github" } diff --git a/flake.nix b/flake.nix index 019c27641dd..6eeb1a519be 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { llvm-backend.url = "github:runtimeverification/llvm-backend/v0.1.100"; haskell-backend = { - url = "github:runtimeverification/haskell-backend/v0.1.89"; + url = "github:runtimeverification/haskell-backend/v0.1.90"; inputs.rv-utils.follows = "llvm-backend/rv-utils"; inputs.nixpkgs.follows = "llvm-backend/nixpkgs"; }; diff --git a/haskell-backend/src/main/native/haskell-backend b/haskell-backend/src/main/native/haskell-backend index 4fb57a8842d..712543ed61f 160000 --- a/haskell-backend/src/main/native/haskell-backend +++ b/haskell-backend/src/main/native/haskell-backend @@ -1 +1 @@ -Subproject commit 4fb57a8842d04ba0ce27393f7073feb21539118b +Subproject commit 712543ed61f5ca4365b84d0f7ef6d71a35349662