[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 2bc1afe528 196/323: Strip -save-temps when -P
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 2bc1afe528 196/323: Strip -save-temps when -P is provided |
Date: |
Thu, 9 Mar 2023 10:58:30 -0500 (EST) |
branch: externals/beardbolt
commit 2bc1afe528b70b8aad4243a3b2b72bcf09a599e1
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>
Strip -save-temps when -P is provided
Closes #16
---
rmsbolt.el | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index 931cc0b655..2e771abbf8 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -179,6 +179,18 @@ being set (at worst falling back to nil if passed
\"intel\")."
:type 'boolean
:safe 'booleanp
:group 'rmsbolt)
+(defcustom rmsbolt-flag-quirks t
+ "Whether to tweak flags to enable as many features as possible.
+
+In most cases, we will try to honor flags in rmsbolt-command as
+much as possible. However, some features may be disabled with
+some odd combinations of flags. This variable controls
+removing/adding flags to handle those cases.
+
+Note that basic flags to ensure basic usage are always modified."
+ :type 'boolean
+ :safe 'booleanp
+ :group 'rmsbolt)
;;;; Faces
@@ -383,6 +395,16 @@ Return value is quoted for passing to the shell."
;;;; Language Functions
;;;;; Compile Commands
+(defun rmsbolt--c-quirks (cmd &key src-buffer)
+ "Handle quirks in CMD, and return unchanged or modified CMD.
+
+Use SRC-BUFFER as buffer for local variables."
+ (if (and (buffer-local-value 'rmsbolt-flag-quirks src-buffer)
+ (string-match-p (rx "-save-temps") cmd)
+ (string-match-p (rx "-P") cmd))
+ (rmsbolt-split-rm-single cmd "-save-temps")
+ cmd))
+
(cl-defun rmsbolt--c-compile-cmd (&key src-buffer)
"Process a compile command for gcc/clang."
@@ -406,7 +428,8 @@ Return value is quoted for passing to the shell."
(when (and (not (booleanp asm-format))
(not disass))
(concat "-masm=" asm-format)))
- " ")))
+ " "))
+ (cmd (rmsbolt--c-quirks cmd :src-buffer src-buffer)))
cmd)))
(cl-defun rmsbolt--ocaml-compile-cmd (&key src-buffer)
- [elpa] externals/beardbolt 73a547856c 182/323: Remove rmsbolt-command from local variables in starter file, (continued)
- [elpa] externals/beardbolt 73a547856c 182/323: Remove rmsbolt-command from local variables in starter file, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7045b8116a 185/323: Fixed spelling mistake, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 8ad27e8490 176/323: Added basic documentation for Go support, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 25cd95a3b3 174/323: Fix a typo, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt af0a8a6ec9 189/323: Merge branch 'master' of gitlab.com:jgkamat/rmsbolt, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt fcefc0509d 184/323: Add basic documentation for Swift, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1b015e8d9b 212/323: Update ci to use alpine directly, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 62e68ea2d4 194/323: Fix overlays not working on first compile with popup, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 536a699d1f 193/323: Clean up overlays and mappings if compilation fails, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt ea3e0e4257 200/323: Fix incorrect matching of filenames for compile_commands.json, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2bc1afe528 196/323: Strip -save-temps when -P is provided,
ELPA Syncer <=
- [elpa] externals/beardbolt 840d7f7a1e 195/323: Add :force t argument to rmsbolt-move-overlays, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c86cc8f11e 199/323: Fix highlights not working with compile_commands.json in some cases, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1c0e96060b 229/323: Don't set global kill-buffer-hook, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7a964319ba 213/323: Merge branch 'zig-0.9' into 'master', ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 981522dcaa 218/323: Improve `rmsbolt-mode` docstring, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2e1ff0653e 216/323: Correct location of parse hook, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 345059d4f4 219/323: Set `defvar-local` vars with `setq`, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4f6ffdd254 226/323: Rename rmsbolt-move-overlays -> rmsbolt-update-overlays, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 464b524e49 221/323: Remove redundant `and`, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 51ff24b3b1 217/323: Fix native-comp docstring warnings, ELPA Syncer, 2023/03/09