emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/beardbolt f04df12d28 011/323: Add config facility for o


From: ELPA Syncer
Subject: [elpa] externals/beardbolt f04df12d28 011/323: Add config facility for object dumping
Date: Thu, 9 Mar 2023 10:57:50 -0500 (EST)

branch: externals/beardbolt
commit f04df12d2887ff12756f03b521a2f425d67a185d
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>

    Add config facility for object dumping
---
 rmsbolt.el | 60 ++++++++++++++++++++++++++++++++++++++----------------------
 1 file changed, 38 insertions(+), 22 deletions(-)

diff --git a/rmsbolt.el b/rmsbolt.el
index e89b568006..c69ff8efe1 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -91,8 +91,12 @@
                (:conc-name rmsbolt-o-))
   (compile-cmd
    ""
-   :type string
-   :documentation "The command used to compile this file"))
+   :type 'string
+   :documentation "The command used to compile this file")
+  (binary-compile
+   nil
+   :type 'bool
+   :documentation "Whether we should compile to binary and dissasemble that."))
 
 (cl-defstruct (rmsbolt-lang
                (:conc-name rmsbolt-l-))
@@ -104,6 +108,14 @@
    'fundamental-mode
    :type 'symbol
    :documentation "The mode to activate this language in.")
+  (supports-binary
+   nil
+   :type 'bool
+   :documentation "If we support binary dumping with this language.")
+  (objdumper
+   "objdump"
+   :type 'string
+   :documentation "The object dumper to use if dissasembling binary.")
   (starter-file
    nil
    :type 'string
@@ -113,16 +125,19 @@
    :type 'string
    :documentation "The starter filename to use"))
 
-(defvar rmsbolt-languages
-  `((c-mode
-     . ,(make-rmsbolt-lang :mode 'c
-                           :options (make-rmsbolt-options
-                                     :compile-cmd "gcc -O0")
-                           :starter-file-name "rmsbolt.c"
-                           :starter-file
-                           "#include <stdio.h>
+(defvar rmsbolt-languages)
+(setq
+ rmsbolt-languages
+ `((c-mode
+    . ,(make-rmsbolt-lang :mode 'c
+                          :options (make-rmsbolt-options
+                                    :compile-cmd "gcc")
+                          :supports-binary t
+                          :starter-file-name "rmsbolt.c"
+                          :starter-file
+                          "#include <stdio.h>
 
-// RMS: gcc -O0
+// RMS: gcc -O3
 
 int isRMS(int a) {
         switch (a) {
@@ -143,16 +158,17 @@ int main() {
                         printf(\"%c\\n\", a);
 }
 "
-                           ))
-    (c++-mode
-     . ,(make-rmsbolt-lang :mode 'c++-mode
-                           :options (make-rmsbolt-options
-                                     :compile-cmd "g++ -O0")
-                           :starter-file-name "rmsbolt.cpp"
-                           :starter-file
-                           "#include <iostream>
-
-// RMS: g++ -O0
+                          ))
+   (c++-mode
+    . ,(make-rmsbolt-lang :mode 'c++-mode
+                          :options (make-rmsbolt-options
+                                    :compile-cmd "g++")
+                          :supports-binary t
+                          :starter-file-name "rmsbolt.cpp"
+                          :starter-file
+                          "#include <iostream>
+
+// RMS: g++ -O3
 
 int isRMS(int a) {
         switch (a) {
@@ -173,7 +189,7 @@ int main() {
                         std::cout << a << std::endl;
 }
 "
-                           ))))
+                          ))))
 
 
 ;;;; Macros



reply via email to

[Prev in Thread] Current Thread [Next in Thread]