1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

When building amalgamated build on windows, patch source-map.

We don't want any backslahes cropping up in the offical distribution of
janet.c.
This commit is contained in:
bakpakin 2021-07-25 15:53:38 -05:00
parent cc07b4a89a
commit 4cae7e6d5d

View File

@ -3616,6 +3616,9 @@
(put flat :doc nil))
(when (boot/config :no-sourcemaps)
(put flat :source-map nil))
# Fix directory separators on windows to make image identical between windows and non-windows
(when-let [sm (get flat :source-map)]
(put flat :source-map [(string/replace-all "\\" "/" (sm 0)) (sm 1) (sm 2)]))
(if (v :private)
(put root-env k nil)
(put root-env k flat)))