Re: [Qbs] (no subject)

2021-04-06 Thread Christian Kandeler

On 4/6/21 10:58 AM, Dan Pat wrote:
Hello. A bunch of Products must be built using a certain set of "cpp" 
flags. I created a special Module (later referred to as "CppFlags"") 
containing those flags and had these Products depend upon CppFlags. 
There are other Modules that the Products depend on, and some of these 
Modules contain Rules that generate cpp files, which also must be 
built using the above mentioned set of "cpp" flags. But it seems that 
since such generator Modules do not explicitly depend on CppFlags, 
they do not pick up the required flags. So the question is how do I 
make sure that a certain set of flags is applied to any cpp file built 
in the context of a Product?


If you really assign to cpp properties in your flags module, then these 
values should be visible anywhere in the product, as there is only one 
instance of the cpp module. If they are not, you'll need to provide a 
complete minimal variant of your project, so we can see what is going on.



Christian

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2021-01-11 Thread Dan Pat
Thanks, that seems to work.

On Mon, 11 Jan 2021 at 14:56, Christian Kandeler 
wrote:

> On 1/11/21 9:23 AM, Dan Pat wrote:
> > Hi. I have a question about making third-party libraries
> available/visible
> > when running programs from qtcreator.  We have a number of prebuilt
> > libraries in the source tree which are currently wrapped in Modules. The
> > modules contain include/library paths, so any depending products build
> > fine, but fail to run because the runtime is unable to locate the library
> > files. One way (our current approach) to solve the problem is to list
> those
> > files in Modules under Group items, make them installable to
> "install-root"
> > location and make that location searchable by the dynamic linker (under
> > Windows it is the default behaviour). It works but leads to an
> > inconvenience - these files now show up as being part of the depending
> > products. I know that this is by design, but in this case library files
> > being listed N times in N dependent products look strange at the least.
> Can
> > anyone recommend a nicer approach?
>
> In the groups containing the library files, set the filesAreTargets
> property to true.
>
>
> Christian
>
> ___
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs
>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2021-01-11 Thread Christian Kandeler

On 1/11/21 9:23 AM, Dan Pat wrote:

Hi. I have a question about making third-party libraries available/visible
when running programs from qtcreator.  We have a number of prebuilt
libraries in the source tree which are currently wrapped in Modules. The
modules contain include/library paths, so any depending products build
fine, but fail to run because the runtime is unable to locate the library
files. One way (our current approach) to solve the problem is to list those
files in Modules under Group items, make them installable to "install-root"
location and make that location searchable by the dynamic linker (under
Windows it is the default behaviour). It works but leads to an
inconvenience - these files now show up as being part of the depending
products. I know that this is by design, but in this case library files
being listed N times in N dependent products look strange at the least. Can
anyone recommend a nicer approach?


In the groups containing the library files, set the filesAreTargets 
property to true.



Christian

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2020-12-16 Thread Dan Pat
 Hi, Ivan. The work is incomplete and I have insufficient knowledge to go
on without investing time which I don't have right now, sorry.  Maybe, I
could reach you over a private channel to share my work and the issues I am
up against. What do you think?

вт, 15 дек. 2020 г. в 15:41, Иван Комиссаров :

> Hello, Dan! Any chance you publish your solution? I am interested in wasm
> support as well
>
> Ivan
>
> >
> > The goal is to get qbs projects compiled to WebAssembly using the
> emscripten toolchain (and Qt WebAssembly). As for upstreaming: I have
> managed to come up with a working but hacky solution (a small test project)
> which I believe has room for improvement.
> >
> >
>
>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2020-12-15 Thread Иван Комиссаров
Hello, Dan! Any chance you publish your solution? I am interested in wasm 
support as well

Ivan

>  
> The goal is to get qbs projects compiled to WebAssembly using the emscripten 
> toolchain (and Qt WebAssembly). As for upstreaming: I have managed to come up 
> with a working but hacky solution (a small test project) which I believe has 
> room for improvement. 
> 
> 

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2020-10-27 Thread Dan Pat
>
> You can provide your own cpp implementation by overriding the search
> path, but I don't see how you would be able to refer to the contents of
> the original directory. Note that the files there are implementation
> details and their presence and names cannot be relied upon. It's not a
> supported use case to derive from these items. So to achieve what you
> want, you'd have to copy the qbs module files you want to extend


My fears confirmed.

Out of curiosity: Which special features does it implement and why are
> they not suitable for upstreaming?


The goal is to get qbs projects compiled to WebAssembly using the
emscripten toolchain (and Qt WebAssembly). As for upstreaming: I have
managed to come up with a working but hacky solution (a small test project)
which I believe has room for improvement.

вт, 27 окт. 2020 г. в 15:58, Christian Kandeler :

> On 10/27/20 11:47 AM, Dan Pat wrote:
> > Hi, I have created a Module that inherits GenericGcc
>
>
> Out of curiosity: Which special features does it implement and why are
> they not suitable for upstreaming?
>
>
> > and hence is loaded as a "cpp" module when certain conditions are met.
> > During development the module file was located in the module directory
> > of the QtCreator installation. But I would like to move it to the qbs
> > module directory inside our project (using qbsSearchPaths). It is
> > desirable that the module be addressable by "cpp" name to avoid
> > changing the project files. To try to achieve that I created a
> > directory called "cpp" in the project module directory hoping that the
> > contents of this directory and the contents of the QtCreator qbs
> > module directory will somehow merge together. But it didn't work as
> > you might guess). Any ideas how to pull that off without having to
> > keep a copy of the file in the QtCreator qbs module directory?
>
>
> You can provide your own cpp implementation by overriding the search
> path, but I don't see how you would be able to refer to the contents of
> the original directory. Note that the files there are implementation
> details and their presence and names cannot be relied upon. It's not a
> supported use case to derive from these items. So to achieve what you
> want, you'd have to copy the qbs module files you want to extend.
>
>
>
> Christian
>
> ___
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs
>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2020-07-31 Thread Jochen Ulrich
Hi!

> Is qbs supposed to work with Qt WebAssembly (I cannot get it to work)?

No, at the moment Qbs does not provide support for WebAssembly.
However, since you can do anything with Qbs, it should be possible to get it to 
work as well. __
In the end, it boils down to writing a Module that provides Rules to process 
the input files as required.
Probably, this Module should derive from the CppModule?! You can have a look at 
the internals of the CppModule here: 
https://code.qt.io/cgit/qbs/qbs.git/tree/share/qbs/modules/cpp
Unfortunately, I have no knowledge of WebAssembly so I cannot help with the 
details. :-/

> If not, are there plans to add support?

I don't think there are any plans yet. Contributions are welcome, of course. __

Best
Jochen

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2019-12-12 Thread Иван Комиссаров
https://bugreports.qt.io/browse/QBS-1522

> 29 нояб. 2019 г., в 08:03, Dan Pat  написал(а):
> 
> > Who imposes that requirement and why?
> Ok. Here's the thing. The project I am working on is based on Qt library and 
> consists of a bunch of libraries and executables with dependencies between 
> them expressed via a "Depends" language item. Plus there a number of 
> pre-built third-party libraries wrapped in Modules that some of the Products 
> within the project depend on. The project compiles and links and I can run 
> the executables just fine. Now comes Asan. We use a dynamic version of Asan, 
> since the CRT we use is dynamic (compilation with /MD option) . The first 
> step was to compile the project with sanitiser support. I managed that, but I 
> when tried to to run one of the tests, Asan reported an error. I did a bit of 
> research and figured out that the error was detected early on during 
> initialization of Qt DLLs. From what I have been able to find out from 
> Internet sources and through a  bit of testing I concluded that for the 
> sanitizer to work properly, the asan.dll must be loaded before any other DLL 
> in the process, specifically before the C runtime library, because it needs 
> to do some hotpatching in order to be able trace every heap allocation call. 
> In my case, seemingly, the asan.dll was loaded somewhere in the middle of the 
> DLL loading sequence when some of the heap allocation has already been done 
> resulting in a false error report. My research revealed that in order for the 
> asan.dll to be loaded first, its import record in the binary IAT must come 
> first, and for the import record to come first the corresponding import 
> library must come first on the linker's list of imports. The asan library is 
> contained in a Module, and I have no idea how to get its import to the 
> beginning of the linker's list. Let's consider an example Product. Looking at 
> an issued linker command:  Module dependencies are listed after any Product 
> dependencies, any libraries specified directly in cpp.dynamicLibraries (as an 
> experiment, we  normally use Depends) come before Module dependencies but 
> after any Product dependencies, any cpp,linkerFlags (tried as a last resort) 
> go the end of the linker's arguments string.  I hope I have made myself 
> clear, thank you. 
> 
> чт, 28 нояб. 2019 г. в 21:37, Иван Комиссаров  >:
> It’s worth mentioning, that compiling with verbose flag can give some insight 
> on what libraries/options clang-cl passes to the linker:
> 
> clang-cl -v -fsanitize=address main.cpp
> 
> Иван Комиссаров
> 
>> 28 нояб. 2019 г., в 17:23, Иван Комиссаров > > написал(а):
>> 
>> I did a small research and was able to compile a small example with 
>> clang-cl and asan.
>> Here are the flags I had to set manually:
>> 
>> cpp.optimization: "none"
>> cpp.cxxFlags: [
>> "/MT",
>> "-fsanitize=address",
>> ]
>> cpp.linkerFlags: [
>> 
>> "-wholearchive:C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan-x86_64.lib",
>> 
>> "-wholearchive:C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan_cxx-x86_64.lib",
>> ]
>> cpp.staticLibraries: [
>> 
>> "C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan-x86_64.lib",
>> 
>> "C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan_cxx-x86_64.lib",
>> ]
>> 
>> Probably, we should add some support for that in Qbs...
>> The problem is that qbs calls the linker directly (which is not the same 
>> clang-cl uses), maybe it’s worth using clang-cl for linking... or just add 
>> support for the usual clang with msvc ABI (I have plans for that for 1.16)
>> 
>> Иван Комиссаров
>> 
>>> 28 нояб. 2019 г., в 15:53, Christian Kandeler >> > написал(а):
>>> 
>>> On Thu, 28 Nov 2019 18:58:54 +0500
>>> Dan Pat mailto:danni...@gmail.com>> wrote:
>>> 
 Hello. I am trying to use Asan in my project (windows 10, clang-cl).
 There's a requirement for the Asan import library to appear first in the
 linker's list of import libraries. 
>>> 
>>> Who imposes that requirement and why?
>>> 
 I cannot seem to find a way to achieve this with qbs. Any suggestions?
>>> 
>>> If you are sure it's really, really needed, you can use a Properties item 
>>> in your product with e.g. cpp.dynamicLibraries 
>>> (https://doc.qt.io/qbs/qml-qbslanguageitems-properties.html#overrideListProperties-prop
>>>  
>>> ),
>>>  but then you will have to list *all* libraries there.
>>> 
>>> 
>>> Christian
>>> ___
>>> Qbs mailing list
>>> Qbs@qt-project.org 
>>> https://lists.qt-project.org/listinfo/qbs 
>>> 
> 

Re: [Qbs] (no subject)

2019-12-03 Thread Dan Pat
Ok, I'll give it a try. Thank you!

пн, 2 дек. 2019 г., 22:27 Иван Комиссаров :

> Hello, Dan!
>
> It’s very sad to hear that QtC crashes for you.
>
> There’s one known issue in qbs which will be fixed with QtC 4.11 release.
> Can you please try release candidate if it works better or not?
> https://download.qt.io/development_releases/qtcreator/4.11/4.11.0-rc1/
>
> If release candidate still crashes, it might be worth compiling QtCreator
> manually in release with debug info - in that case, you will be able to
> attach a post-mortem debugger to it and see what happens
>
> PS: I am experiencing crashes on MacOS with QtC 4.10, but they are not
> related to qbs as far as I can see from the backtrace.
>
> > 2 дек. 2019 г., в 07:55, Dan Pat  написал(а):
> >
> > Hello, my qtcreator keeps crashing during reparsing of qbs projects
> (windows 10) - like twice or thrice a day. I'd really like to provide
> something along the lines of a log or a backtrace. Does such a log exist?
> AFAIK, to get a meaningfull backtrace for release builds under windows some
> sort of a backtrace creation facility has to be used. Does qtcreator/qbs
> have one in place?
> > ___
> > Qbs mailing list
> > Qbs@qt-project.org
> > https://lists.qt-project.org/listinfo/qbs
>
>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2019-12-02 Thread Иван Комиссаров
Hello, Dan!

It’s very sad to hear that QtC crashes for you.

There’s one known issue in qbs which will be fixed with QtC 4.11 release. Can 
you please try release candidate if it works better or not? 
https://download.qt.io/development_releases/qtcreator/4.11/4.11.0-rc1/

If release candidate still crashes, it might be worth compiling QtCreator 
manually in release with debug info - in that case, you will be able to attach 
a post-mortem debugger to it and see what happens

PS: I am experiencing crashes on MacOS with QtC 4.10, but they are not related 
to qbs as far as I can see from the backtrace.

> 2 дек. 2019 г., в 07:55, Dan Pat  написал(а):
> 
> Hello, my qtcreator keeps crashing during reparsing of qbs projects (windows 
> 10) - like twice or thrice a day. I'd really like to provide something along 
> the lines of a log or a backtrace. Does such a log exist? AFAIK, to get a 
> meaningfull backtrace for release builds under windows some sort of a 
> backtrace creation facility has to be used. Does qtcreator/qbs have one in 
> place?  
> ___
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs

___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2019-11-28 Thread Dan Pat
 > Who imposes that requirement and why?
Ok. Here's the thing. The project I am working on is based on Qt library
and consists of a bunch of libraries and executables with dependencies
between them expressed via a "Depends" language item. Plus there a number
of pre-built third-party libraries wrapped in Modules that some of the
Products within the project depend on. The project compiles and links and I
can run the executables just fine. Now comes Asan. We use a dynamic version
of Asan, since the CRT we use is dynamic (compilation with /MD option) .
The first step was to compile the project with sanitiser support. I managed
that, but I when tried to to run one of the tests, Asan reported an error.
I did a bit of research and figured out that the error was detected early
on during initialization of Qt DLLs. From what I have been able to find out
from Internet sources and through a  bit of testing I concluded that for
the sanitizer to work properly, the asan.dll must be loaded before any
other DLL in the process, specifically before the C runtime library,
because it needs to do some hotpatching in order to be able trace every
heap allocation call. In my case, seemingly, the asan.dll was loaded
somewhere in the middle of the DLL loading sequence when some of the heap
allocation has already been done resulting in a false error report. My
research revealed that in order for the asan.dll to be loaded first, its
import record in the binary IAT must come first, and for the import record
to come first the corresponding import library must come first on the
linker's list of imports. The asan library is contained in a Module, and I
have no idea how to get its import to the beginning of the linker's list.
Let's consider an example Product. Looking at an issued linker command:
Module dependencies are listed after any Product dependencies, any
libraries specified directly in cpp.dynamicLibraries (as an experiment, we
normally use Depends) come before Module dependencies but after any Product
dependencies, any cpp,linkerFlags (tried as a last resort) go the end of
the linker's arguments string.  I hope I have made myself clear, thank you.

чт, 28 нояб. 2019 г. в 21:37, Иван Комиссаров :

> It’s worth mentioning, that compiling with verbose flag can give some
> insight on what libraries/options clang-cl passes to the linker:
>
> clang-cl -v -fsanitize=address main.cpp
>
> Иван Комиссаров
>
> 28 нояб. 2019 г., в 17:23, Иван Комиссаров  написал(а):
>
> I did a small research and was able to compile a small example with
> clang-cl and asan.
> Here are the flags I had to set manually:
>
>
> cpp.optimization: "none"
>
> cpp.cxxFlags: [
>
> "/MT",
>
> "-fsanitize=address",
>
> ]
>
> cpp.linkerFlags: [
>
>
> "-wholearchive:C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan-x86_64.lib",
>
>
> "-wholearchive:C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan_cxx-x86_64.lib",
>
> ]
>
> cpp.staticLibraries: [
>
>
> "C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan-x86_64.lib",
>
>
> "C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan_cxx-x86_64.lib",
>
> ]
>
> Probably, we should add some support for that in Qbs...
> The problem is that qbs calls the linker directly (which is not the same
> clang-cl uses), maybe it’s worth using clang-cl for linking... or just add
> support for the usual clang with msvc ABI (I have plans for that for 1.16)
>
> Иван Комиссаров
>
> 28 нояб. 2019 г., в 15:53, Christian Kandeler 
> написал(а):
>
> On Thu, 28 Nov 2019 18:58:54 +0500
> Dan Pat  wrote:
>
> Hello. I am trying to use Asan in my project (windows 10, clang-cl).
>
> There's a requirement for the Asan import library to appear first in the
>
> linker's list of import libraries.
>
>
> Who imposes that requirement and why?
>
> I cannot seem to find a way to achieve this with qbs. Any suggestions?
>
>
> If you are sure it's really, really needed, you can use a Properties item
> in your product with e.g. cpp.dynamicLibraries (
> https://doc.qt.io/qbs/qml-qbslanguageitems-properties.html#overrideListProperties-prop),
> but then you will have to list *all* libraries there.
>
>
> Christian
> ___
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs
>
> ___
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs
>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2019-11-28 Thread Иван Комиссаров
It’s worth mentioning, that compiling with verbose flag can give some insight 
on what libraries/options clang-cl passes to the linker:

clang-cl -v -fsanitize=address main.cpp

Иван Комиссаров

> 28 нояб. 2019 г., в 17:23, Иван Комиссаров  написал(а):
> 
> I did a small research and was able to compile a small example with clang-cl 
> and asan.
> Here are the flags I had to set manually:
> 
> cpp.optimization: "none"
> cpp.cxxFlags: [
> "/MT",
> "-fsanitize=address",
> ]
> cpp.linkerFlags: [
> 
> "-wholearchive:C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan-x86_64.lib",
> 
> "-wholearchive:C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan_cxx-x86_64.lib",
> ]
> cpp.staticLibraries: [
> 
> "C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan-x86_64.lib",
> 
> "C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan_cxx-x86_64.lib",
> ]
> 
> Probably, we should add some support for that in Qbs...
> The problem is that qbs calls the linker directly (which is not the same 
> clang-cl uses), maybe it’s worth using clang-cl for linking... or just add 
> support for the usual clang with msvc ABI (I have plans for that for 1.16)
> 
> Иван Комиссаров
> 
>>> 28 нояб. 2019 г., в 15:53, Christian Kandeler  
>>> написал(а):
>>> 
>> On Thu, 28 Nov 2019 18:58:54 +0500
>> Dan Pat  wrote:
>> 
>>> Hello. I am trying to use Asan in my project (windows 10, clang-cl).
>>> There's a requirement for the Asan import library to appear first in the
>>> linker's list of import libraries. 
>> 
>> Who imposes that requirement and why?
>> 
>>> I cannot seem to find a way to achieve this with qbs. Any suggestions?
>> 
>> If you are sure it's really, really needed, you can use a Properties item in 
>> your product with e.g. cpp.dynamicLibraries 
>> (https://doc.qt.io/qbs/qml-qbslanguageitems-properties.html#overrideListProperties-prop),
>>  but then you will have to list *all* libraries there.
>> 
>> 
>> Christian
>> ___
>> Qbs mailing list
>> Qbs@qt-project.org
>> https://lists.qt-project.org/listinfo/qbs
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2019-11-28 Thread Иван Комиссаров
I did a small research and was able to compile a small example with clang-cl 
and asan.
Here are the flags I had to set manually:

cpp.optimization: "none"
cpp.cxxFlags: [
"/MT",
"-fsanitize=address",
]
cpp.linkerFlags: [

"-wholearchive:C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan-x86_64.lib",

"-wholearchive:C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan_cxx-x86_64.lib",
]
cpp.staticLibraries: [

"C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan-x86_64.lib",

"C:\\Developer\\LLVM\\lib\\clang\\8.0.0\\lib\\windows\\clang_rt.asan_cxx-x86_64.lib",
]

Probably, we should add some support for that in Qbs...
The problem is that qbs calls the linker directly (which is not the same 
clang-cl uses), maybe it’s worth using clang-cl for linking... or just add 
support for the usual clang with msvc ABI (I have plans for that for 1.16)

Иван Комиссаров

> 28 нояб. 2019 г., в 15:53, Christian Kandeler  
> написал(а):
> 
> On Thu, 28 Nov 2019 18:58:54 +0500
> Dan Pat  wrote:
> 
>> Hello. I am trying to use Asan in my project (windows 10, clang-cl).
>> There's a requirement for the Asan import library to appear first in the
>> linker's list of import libraries. 
> 
> Who imposes that requirement and why?
> 
>> I cannot seem to find a way to achieve this with qbs. Any suggestions?
> 
> If you are sure it's really, really needed, you can use a Properties item in 
> your product with e.g. cpp.dynamicLibraries 
> (https://doc.qt.io/qbs/qml-qbslanguageitems-properties.html#overrideListProperties-prop),
>  but then you will have to list *all* libraries there.
> 
> 
> Christian
> ___
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] (no subject)

2019-11-28 Thread Christian Kandeler
On Thu, 28 Nov 2019 18:58:54 +0500
Dan Pat  wrote:

> Hello. I am trying to use Asan in my project (windows 10, clang-cl).
> There's a requirement for the Asan import library to appear first in the
> linker's list of import libraries. 

Who imposes that requirement and why?

> I cannot seem to find a way to achieve this with qbs. Any suggestions?

If you are sure it's really, really needed, you can use a Properties item in 
your product with e.g. cpp.dynamicLibraries 
(https://doc.qt.io/qbs/qml-qbslanguageitems-properties.html#overrideListProperties-prop),
 but then you will have to list *all* libraries there.


Christian
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [QBS] (no subject)

2013-05-16 Thread Joerg Bornemann
On 15/05/2013 18:28, Kakadu wrote:

 Now qbs take source file and generates result in  build folder. I have 
 compiler which takes source files and places result always in the same 
 folder. Is it possible to hack qbs to copy source file to build directory and 
 built it there? How difficult is it?

You'd have to add a copy command before the actual compiler call. 
Something like this:

---snip---
Rule {
 ...
 prepare: {
 ...
 var commands = [];
 // copy source file
 var cmd = new Command(cp, [input.fileName, 
FileInfo.path(output.fileName));
 commands.push(cmd);
 // now the actual compiler call
 cmd = new Command(g++, args);
 commands.push(cmd);
 return commands;
 }
}
---snap---

Instead of calling cp you can use a JavaScript command and copy the file 
via File.copy in a platform-independent way, if you want.


BR,

Joerg

___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] (no subject)

2013-05-16 Thread Kakadu
Oh, I didn't expect that prepare can return many commands. thanks.

-- 
Best wishes,
Kakadu

16.05.2013, 12:14, Joerg Bornemann joerg.bornem...@digia.com:
 On 15/05/2013 18:28, Kakadu wrote:

  Now qbs take source file and generates result in  build folder. I have 
 compiler which takes source files and places result always in the same 
 folder. Is it possible to hack qbs to copy source file to build directory 
 and built it there? How difficult is it?

 You'd have to add a copy command before the actual compiler call.
 Something like this:

 ---snip---
 Rule {
  ...
  prepare: {
  ...
  var commands = [];
  // copy source file
  var cmd = new Command(cp, [input.fileName,
 FileInfo.path(output.fileName));
  commands.push(cmd);
  // now the actual compiler call
  cmd = new Command(g++, args);
  commands.push(cmd);
  return commands;
  }
 }
 ---snap---

 Instead of calling cp you can use a JavaScript command and copy the file
 via File.copy in a platform-independent way, if you want.

 BR,

 Joerg

 ___
 QBS mailing list
 QBS@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/qbs
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs