Subject: [PATCH 1/2] gnu: Add asmjit.

From: jgart <[email-masked]>
Date: Sat, 27 Nov 2021 19:55:26 -0500

From: guixrus <[email-masked]>

* gnu/packages/cpp.scm (asmjit): New variable.

Co-authored-by: jgart <[email-masked]>
Co-authored-by: Raghav Gururajan <[email-masked]>
Co-authored-by: Julien Lepiller <[email-masked]>
Co-authored-by: Disseminate Dissent <[email-masked]>
---
 gnu/packages/cpp.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9520a164f1..8ed639cc49 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1373,6 +1373,38 @@ (define-public jsonnet
 syntax with variables, conditions, functions and more.")
     (license license:asl2.0)))
 
+(define-public asmjit
+  (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
+        (revision "0"))
+    (package
+      (name "asmjit")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/asmjit/asmjit")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
+      (build-system cmake-build-system)
+      (arguments
+        `(#:configure-flags
+          '("-DASMJIT_TEST=TRUE")))
+      (synopsis "Machine code generation for C++")
+      (description
+"AsmJit is a lightweight library for machine code generation written
+in C++ language. It can generate machine code for X86 and X86_64
+architectures with the support for the whole instruction set - from
+legacy MMX to the newest AVX-512 and AMX. It has a type-safe API that
+allows C++ compiler to do semantic checks at compile-time even before the
+assembled code is generated or executed. It also provides an optional
+register allocator that makes it easy to generate complex code without
+a significant development effort.")
+      (home-page "https://asmjit.com/")
+      (license license:zlib))))
+
 (define-public simdjson
   (package
     (name "simdjson")
-- 
2.34.0