emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] [WIP] Port feature/native-comp to Windows.


From: Andrea Corallo
Subject: Re: [PATCH] [WIP] Port feature/native-comp to Windows.
Date: Tue, 12 May 2020 18:21:57 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Nicolas Bértolo <address@hidden> writes:

>> libdl exists only in MinGW64, I think.
>
>> Why do you need it? is it because the code uses dlopen/dlsym
>> somewhere?
>
> The code uses `dynlib_open` and `dynlib_sym` which are implemented using libdl
> in Posix systems. The original libgccjit uses it to implement the
> `compile_to_memory` function that we do not use. The version of libgccjit I am
> using implements that feature using native Windows functions, so libdl is not
> necessary.
>
> I don't think we can remove it because that part of the code runs only when 
> the
> platform is not Mingw, and in that case libdl is necessary.
>
>> I think it's good to #undef each symbol before defining it.
>
> Fixed in the new patch.

Hi Nicolas,

I think would be handy to have 'native-comp-available-p' always defined
also when compiling without the native compiler.  Similarly to what we
have for gnutls-available-p and libxml-available-p.

+static bool
+load_gccjit_if_necessary(bool mandatory)
                       ^^^
                    space here
+{
+#ifdef WINDOWSNT
+  if (!gccjit_initialized)
+    {
+      Lisp_Object status;
+      gccjit_initialized = init_gccjit_functions ();
+

Also I think gccjit_initialized should be declared be static inside
load_gccjit_if_necessary given should and is used only there.

Thanks

  Andrea

-- 
address@hidden



reply via email to

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