Conversation
Member
Author
|
example target("test")
set_kind("binary")
set_plat(os.host()) --> 当交叉编译的时候,强制对test目标切到host工具链编译
set_arch(os.arch())
add_files("src/*.c")或者 target("test")
set_kind("binary")
set_toolchains("xcode", {plat = os.host(), arch = os.arch()})
add_files("src/*.c") |
Member
Author
|
@orzuk-lmj 方便抽空帮忙测试下这个toolchain分支么,我最近对msvc工具链改动比较大,虽然ci上测试ok,还是想多测下,你这环境应该比复杂点,如果能通过,那基本问题应该不大了。 xmake update github:xmake-io/xmake#toolchain |
Member
Author
Contributor
|
我用win10 git checkout最新 toolchain 分支的時候有遇到錯誤訊息 感覺是在試驗路徑最大長度,但這樣的話在win10就抓不下來了 |
Member
Author
哦 这个我刚去掉了,你拉最新的commit试试 |
Contributor
|
遇到個問題,錯誤訊息如下: [ 37%]: compiling.debug src\mztools.c
cl.exe -c -FS -Zi -Fd..\_build\vs2015-x64-debug\windows\x64\debug\compile.minizip.pdb -W3 -WX -Od -Iinc -D__platform_windows__ -D__config_x64__ -D__config_debug__ -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DDEBUG -D_DEBUG -D_CRT_SECURE_NO_WARNINGS /GR /EHsc /MP /openmp /bigobj /MDd /Ob0 /RTC1 -nologo -Fo..\_build\vs2015-x64-debug\.objs\minizip\windows\x64\debug\src\mztools.c.obj src\mztools.c
error: @programdir\modules\private\async\runjobs.lua:207: @programdir\modules\private\action\build\object.lua:75: @programdir\modules\core\tools\cl.lua:383:
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:792]: in function 'raise'
[@programdir\modules\core\tools\cl.lua:383]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:127]: in function 'try'
[@programdir\modules\core\tools\cl.lua:346]:
[C]: in function 'compile'
[@programdir\modules\private\action\build\object.lua:75]: in function 'script'
[@programdir\modules\private\action\build\object.lua:88]: in function '_build_object'
[@programdir\modules\private\action\build\object.lua:113]: in function 'jobfunc'
[@programdir\modules\private\async\runjobs.lua:185]:
[C]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:121]: in function 'try'
[@programdir\modules\private\async\runjobs.lua:182]: in function 'cotask'
[@programdir\core\base\scheduler.lua:317]:
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:792: in function 'raise'
@programdir\modules\private\async\runjobs.lua:207: in function 'catch'
@programdir\core\sandbox\modules\try.lua:127: in function 'try'
@programdir\modules\private\async\runjobs.lua:182: in function 'cotask'
@programdir\core\base\scheduler.lua:317: in function <@programdir\core\base\scheduler.lua:315> |
Member
Author
你这里怎么还是老的?确定是最新的toolchain版本?我现在应该改成 cl.exe的全路径才对。。要不你清下下 config cache试试? xmake f -c 或者删下 .xmake目录 |
Contributor
|
我重新 checkout 最新的 toolchain 分支試試 |
Member
Author
|
可以么? |
Contributor
我用 5683e06 測試,目前手邊平台全編譯了一次,都正常運作, good job 👍 |
Member
Author
|
非常感谢 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当前xmake主要通过全局config配置唯一工具链,在特定target切换toolchain时候,支持不是很好。。
当前这个改进点,主要为了支持交叉编译时候,特定target还是走host工具链编译的场景,具体相关xmake.lua例子可以参考:
另外之前msvc的工具链的环境变量都是全局设置的,容易污染全局环境,也不方便切换,目前改为更加细粒度的envs绑定到os.execv上。只在对应的toolchain的runenvs进行绑定。。