[Scons-users] 回复: Scons-users Digest, Vol 144, Issue 8

Yu,Zhiwei (YFI,Shanghai,CN) zhiwei.yu at yanfeng.com
Mon Sep 25 06:23:09 EDT 2023


Hi Guys,

	I find that if I set -j8, the printing messages sequence will be disordered.
	I think the reason is python print buffer has competition in multithreading. Am I right?
	And how can I resolve it.


Best Regards!

于志伟
Software Engineer
延锋科技
------------------------------------
zhiwei_yu at yanfeng.com

  

-----邮件原件-----
发件人: Scons-users <scons-users-bounces at scons.org> 代表 scons-users-request at scons.org
发送时间: 2023年9月25日 13:34
收件人: scons-users at scons.org
主题: Scons-users Digest, Vol 144, Issue 8

Send Scons-users mailing list submissions to
	scons-users at scons.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://pairlist4.pair.net/mailman/listinfo/scons-users
or, via email, send a message with subject or body 'help' to
	scons-users-request at scons.org

You can reach the person managing the list at
	scons-users-owner at scons.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of Scons-users digest..."


Today's Topics:

   1. Re: How remove defalut target from Object function (Bill Deegan)
   2. Re: How remove defalut target from Object function (Bill Deegan)
   3. ??: Scons-users Digest, Vol 144, Issue 7
      (Yu,Zhiwei (YFI,Shanghai,CN))


----------------------------------------------------------------------

Message: 1
Date: Sun, 24 Sep 2023 14:29:42 -0700
From: Bill Deegan <bill at baddogconsulting.com>
To: SCons users mailing list <scons-users at scons.org>
Subject: Re: [Scons-users] How remove defalut target from Object
	function
Message-ID:
	<CAEyG4CEMqEZwUiUszjDeE3FKdSoN=iF0Yx7jnBHOQ4bJKKSKyQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Should be fairly easy.
Just change your build string to have
-o ${TARGET.dir}
instead of
-o $TARGET

If this is for non-shared object C file the variable in question would be CCCOM.

-Bill

On Sun, Sep 24, 2023 at 1:26?PM Mats Wichmann <mats at wichmann.us> wrote:

> On 9/24/23 06:49, Yu,Zhiwei (YFI,Shanghai,CN) wrote:
> > Hi Guys,
> >
> > I am trying to use Scons with IAR, IAR is a embedded IDE.
> > For iccarm(IAR compiler), It's unnecessary to set target name, I 
> > just set the directory of object file.
> > For example,
> > iccarm.exe -o /Debug/Obj   /Src/main.c
> > But if I don't set target file name, Scons will set default target 
> > file directory and name which base on the source file.
> > I want to use iccarm method that set the target directory only, and 
> > remove default object file name from Object function.
> > How can I do it.
>
> This concept is roughly the same as "batch" building, which is only 
> explicitly supported right now for the Microsoft compiler - you can 
> see a note here:
>
> https://scons.org/doc/production/HTML/scons-man.html#cv-MSVC_BATCH
>
> It's not that this hasn't come up before (see, for example:
> https://github.com/SCons/scons/issues/1923), but the work to expand 
> this to other places hasn't been contributed yet.  Not sure which tool 
> you're using to run iccarm, so it's hard to advise further at this point.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20230924/d5b17c10/attachment-0001.htm>

------------------------------

Message: 2
Date: Sun, 24 Sep 2023 14:31:02 -0700
From: Bill Deegan <bill at baddogconsulting.com>
To: SCons users mailing list <scons-users at scons.org>
Subject: Re: [Scons-users] How remove defalut target from Object
	function
Message-ID:
	<CAEyG4CHKns-gktCBBfiySd=mA0i4QhY1rjPb45EgLnz2Um6k0w at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

One caveat, this assumes the generated file is still going to be /Debug/Obj/main.o from your initial example, and not named something else.
Scons keeps track of the target files and if what a build step generates doesn't match what's expected you will see unnecessary rebuilds.


On Sun, Sep 24, 2023 at 2:29?PM Bill Deegan <bill at baddogconsulting.com>
wrote:

> Should be fairly easy.
> Just change your build string to have
> -o ${TARGET.dir}
> instead of
> -o $TARGET
>
> If this is for non-shared object C file the variable in question would 
> be CCCOM.
>
> -Bill
>
> On Sun, Sep 24, 2023 at 1:26?PM Mats Wichmann <mats at wichmann.us> wrote:
>
>> On 9/24/23 06:49, Yu,Zhiwei (YFI,Shanghai,CN) wrote:
>> > Hi Guys,
>> >
>> > I am trying to use Scons with IAR, IAR is a embedded IDE.
>> > For iccarm(IAR compiler), It's unnecessary to set target name, I 
>> > just set the directory of object file.
>> > For example,
>> > iccarm.exe -o /Debug/Obj   /Src/main.c
>> > But if I don't set target file name, Scons will set default target 
>> > file directory and name which base on the source file.
>> > I want to use iccarm method that set the target directory only, and 
>> > remove default object file name from Object function.
>> > How can I do it.
>>
>> This concept is roughly the same as "batch" building, which is only 
>> explicitly supported right now for the Microsoft compiler - you can 
>> see a note here:
>>
>> https://scons.org/doc/production/HTML/scons-man.html#cv-MSVC_BATCH
>>
>> It's not that this hasn't come up before (see, for example:
>> https://github.com/SCons/scons/issues/1923), but the work to expand 
>> this to other places hasn't been contributed yet.  Not sure which 
>> tool you're using to run iccarm, so it's hard to advise further at this point.
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20230924/29c6579f/attachment-0001.htm>

------------------------------

Message: 3
Date: Mon, 25 Sep 2023 05:33:16 +0000
From: "Yu,Zhiwei (YFI,Shanghai,CN)" <zhiwei.yu at yanfeng.com>
To: "scons-users at scons.org" <scons-users at scons.org>
Subject: [Scons-users] ??: Scons-users Digest, Vol 144, Issue 7
Message-ID:
	<TY2PR04MB3342E227B4D9675716B39F82EBFCA at TY2PR04MB3342.apcprd04.prod.outlook.com>
	
Content-Type: text/plain; charset="utf-8"

Hi Guys?

	I find the wat to remove defalut target from Object function.
	Rplace the Environment CCCOM, CCCOM can set compiler command line.
	For example:
		env.Replace(CCCOM = '$CC $SOURCES -o $TARGET')
		then, the command line will contain the $TARGET
		if I set env.Replace(CCCOM = '$CC $SOURCES -o $TARGETPATH')
		then, the command line will use $TARGETPATH instead of $TARGET. Of course, I need to set Environment TARGETPATH.

Best Regards!

???
Software Engineer
????
------------------------------------
zhiwei_yu at yanfeng.com

? 

-----????-----
???: Scons-users <scons-users-bounces at scons.org> ?? scons-users-request at scons.org
????: 2023?9?25? 4:26
???: scons-users at scons.org
??: Scons-users Digest, Vol 144, Issue 7

CAUTION: This email originated from outside of the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.


Send Scons-users mailing list submissions to
        scons-users at scons.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://pairlist4.pair.net/mailman/listinfo/scons-users
or, via email, send a message with subject or body 'help' to
        scons-users-request at scons.org

You can reach the person managing the list at
        scons-users-owner at scons.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of Scons-users digest..."


Today's Topics:

   1. How remove defalut target from Object function
      (Yu,Zhiwei (YFI,Shanghai,CN))
   2. Re: How remove defalut target from Object function (Mats Wichmann)


----------------------------------------------------------------------

Message: 1
Date: Sun, 24 Sep 2023 12:49:36 +0000
From: "Yu,Zhiwei (YFI,Shanghai,CN)" <zhiwei.yu at yanfeng.com>
To: "scons-users at scons.org" <scons-users at scons.org>
Subject: [Scons-users] How remove defalut target from Object function
Message-ID:
        <TY2PR04MB3342FDECC677936B27867FA3EBFDA at TY2PR04MB3342.apcprd04.prod.outlook.com>

Content-Type: text/plain; charset="utf-8"

Hi Guys,

????I am trying to use Scons with IAR, IAR is a embedded IDE.
????For iccarm(IAR compiler), It's unnecessary to set target name, I just set the directory of object file.
????For example,
???????iccarm.exe -o /Debug/Obj   /Src/main.c
????But if I don't set target file name, Scons will set default target file directory and name which base on the source file.
????I want to use iccarm method that set the target directory only, and remove default object file name from Object function.
????How can I do it.

????Thanks!


Best Regards!


???

Software Engineer

????

------------------------------------

zhiwei_yu at yanfeng.com<mailto:zhiwei_yu at yanfeng.com>



[YF_logo_PNG]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20230924/6dc3436e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-YF_logo_PN.png
Type: image/png
Size: 5412 bytes
Desc: Outlook-YF_logo_PN.png
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20230924/6dc3436e/attachment-0001.png>

------------------------------

Message: 2
Date: Sun, 24 Sep 2023 14:26:00 -0600
From: Mats Wichmann <mats at wichmann.us>
To: scons-users at scons.org
Subject: Re: [Scons-users] How remove defalut target from Object
        function
Message-ID: <4a575215-8e5c-b88b-bc85-74e9c84661b6 at wichmann.us>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 9/24/23 06:49, Yu,Zhiwei (YFI,Shanghai,CN) wrote:
> Hi Guys,
>
> ????I am trying to use Scons with IAR, IAR is a embedded IDE.
> ????For iccarm(IAR compiler), It's unnecessary to set target name, I 
> just set the directory of object file.
> ????For example,
> ???????iccarm.exe -o /Debug/Obj? ?/Src/main.c ????But if I don't set 
> target file name, Scons will set default target file directory and 
> name which base on the source file.
> ????I want to use iccarm method that set the target directory only, 
> and remove default object file name from Object function.
> ????How can I do it.

This concept is roughly the same as "batch" building, which is only explicitly supported right now for the Microsoft compiler - you can see a note here:

https://scons.org/doc/production/HTML/scons-man.html#cv-MSVC_BATCH

It's not that this hasn't come up before (see, for example:
https://github.com/SCons/scons/issues/1923), but the work to expand this to other places hasn't been contributed yet.  Not sure which tool you're using to run iccarm, so it's hard to advise further at this point.



------------------------------

Subject: Digest Footer

_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users


------------------------------

End of Scons-users Digest, Vol 144, Issue 7
*******************************************

------------------------------

Subject: Digest Footer

_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users


------------------------------

End of Scons-users Digest, Vol 144, Issue 8
*******************************************


More information about the Scons-users mailing list