Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully scripted way to build? #37

Closed
NickStrupat opened this issue Jul 8, 2018 · 4 comments
Closed

Fully scripted way to build? #37

NickStrupat opened this issue Jul 8, 2018 · 4 comments

Comments

@NickStrupat
Copy link

I'm wondering if there is a fully scripted way to build clang without needing the UI?

@fcharlie
Copy link
Contributor

fcharlie commented Jul 9, 2018

You can use script not require clangbuilderui

%CLANGBUILDDIR%/bin/clangbuilder.bat 
$CLANGBUILDDIR/bin/ClangbuilderTarget.ps1

Powershell Args:

param (
    [Parameter(Position = 0)]
    [Alias("id")]
    [String]$InstanceId, # install id
    [String]$InstallationVersion, # installationVersion
    [ValidateSet("x86", "x64", "ARM", "ARM64")]
    [String]$Arch = "x64",
    [ValidateSet("Release", "Debug", "MinSizeRel", "RelWithDebug")]
    [String]$Flavor = "Release",
    [ValidateSet("MSBuild", "Ninja", "NinjaBootstrap", "NinjaIterate")]
    [String]$Engine = "MSBuild",
    [ValidateSet("Mainline", "Stable", "Release")]
    [String]$Branch = "Mainline", #mainline 
    [Alias("e")]
    [Switch]$Environment, # start environment 
    [Switch]$Sdklow, # low sdk support
    [Switch]$LLDB,
    [Switch]$LTO,
    [Switch]$Package,
    [Switch]$ClearEnv
)

If not set InstanceId and InstallationVersion clangbuilder will detect vs installation. Arch default is x64 and Branch default is Mainline (git repository master branch).

Switch default is not set, -Package create install package. -LLDB will build lldb, -LTO build clang with lto (maybe failed) -ClearEnv will reset PATH

-Engine Name will set Engine, or use msbuild or use ninja, or use prebuilt clang-cl as C/C++ compiler build llvm. or bootstrap clang.

@fcharlie
Copy link
Contributor

fcharlie commented Jul 9, 2018

First. Your should run script/InitializeEnv.bat to install utils tools.

@NickStrupat
Copy link
Author

I still have never had this work properly. I have the latest version of Visual Studio Community 2017 installed (15.7.4).

after running
.\script\InitializeEnv.bat
I ran
.\bin\ClangbuilderTarget.ps1 -InstanceId 8d9d99ef -InstallationVersion 15.7.27703.2035 -Branch Stable

@fcharlie
Copy link
Contributor

fcharlie commented Jul 9, 2018

@NickStrupat Your console output is ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants