Skip to content

Commit b8ddfd6

Browse files
committed
Add ability to add extra arguments to solc
1 parent d0a09c6 commit b8ddfd6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

solidity-mode.el

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;; Author: Lefteris Karapetsas <lefteris@refu.co>
66
;; Keywords: languages
7-
;; Version: 0.1.1
7+
;; Version: 0.1.2
88

99
;; This program is free software; you can redistribute it and/or modify
1010
;; it under the terms of the GNU General Public License as published by
@@ -49,6 +49,12 @@
4949
:type 'string
5050
:package-version '(solidity . "0.1.1"))
5151

52+
(defcustom solidity-solc-extra-args ""
53+
"Extra arguments to add to pass to the solidity compiler."
54+
:group 'solidity
55+
:type 'string
56+
:package-version '(solidity . "0.1.2"))
57+
5258
(defvar solidity-mode-map
5359
(let ((map (make-keymap)))
5460
(define-key map "\C-j" 'newline-and-indent)
@@ -460,7 +466,9 @@ Highlight the 1st result."
460466
:predicate (lambda () (eq major-mode 'solidity-mode)))
461467
(add-to-list 'flycheck-checkers 'solidity-checker)
462468
(add-hook 'solidity-mode-hook
463-
(lambda () (setq flycheck-solidity-checker-executable solidity-solc-path))))
469+
(lambda ()
470+
(let ((solidity-command (concat solidity-solc-path " " solidity-solc-extra-args)))
471+
(setq flycheck-solidity-checker-executable solidity-command)))))
464472

465473
(provide 'solidity-mode)
466474
;;; solidity-mode.el ends here

0 commit comments

Comments
 (0)