[Pas2js] Force pas2js to transpile unused code
Michael Van Canneyt
michael at freepascal.org
Thu Dec 17 18:13:43 CET 2020
On Thu, 17 Dec 2020, Mattias Gaertner via Pas2js wrote:
> On Thu, 17 Dec 2020 10:06:40 -0700 (MST)
> imperyal <imperyal at gmail.com> wrote:
>
>> In my use case, I call lots of functions from other JS code only, not
>> within the pascal code.
>> I already tried -O- option on pas2js.cfg file. No luck.
>>
>> I'm using Lazarus with pas2js.
>
> Lazarus passes by default -O1.
>
> Add the -O- in Project / Project Options / Compiler Options / Custom
> Options.
This will generate a warning that the same option is passed multiple times
with different values. (guess how I know that...)
You can also uncheck the 'optimizations' in the compiler settings. This will
silence the warning.
Michael.
More information about the Pas2js
mailing list