File tree 3 files changed +20
-9
lines changed
3 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ change-id = 116881
48
48
# We also currently only support this when building LLVM for the build triple.
49
49
#
50
50
# Set this to `"if-unchanged"` to only download if the llvm-project have not
51
- # been modified. (if no changes, the logic is the same as `"if-available"`)
51
+ # been modified. (If there are no changes or if built from tarball source,
52
+ # the logic is the same as "if-available")
52
53
#
53
54
# Note that many of the LLVM options are not currently supported for
54
55
# downloading. Currently only the "assertions" option can be toggled.
Original file line number Diff line number Diff line change @@ -147,8 +147,14 @@ impl Step for Profile {
147
147
}
148
148
149
149
fn run ( self , builder : & Builder < ' _ > ) {
150
- if self == Profile :: Codegen {
151
- builder. update_submodule ( & Path :: new ( "src/llvm-project" ) ) ;
150
+ // During ./x.py setup once you select the codegen profile.
151
+ // The submodule will be downloaded. It does not work in the
152
+ // tarball case since they don't include Git and submodules
153
+ // are already included.
154
+ if !builder. rust_info ( ) . is_from_tarball ( ) {
155
+ if self == Profile :: Codegen {
156
+ builder. update_submodule ( & Path :: new ( "src/llvm-project" ) ) ;
157
+ }
152
158
}
153
159
setup ( & builder. build . config , self )
154
160
}
Original file line number Diff line number Diff line change @@ -2108,12 +2108,16 @@ impl Config {
2108
2108
llvm:: is_ci_llvm_available ( & self , asserts)
2109
2109
}
2110
2110
Some ( StringOrBool :: String ( s) ) if s == "if-unchanged" => {
2111
- if self
2112
- . last_modified_commit ( & [ "src/llvm-project" ] , "download-ci-llvm" , true )
2113
- . is_none ( )
2114
- {
2115
- // there are some untracked changes in the the given paths.
2116
- false
2111
+ if !self . rust_info . is_from_tarball ( ) {
2112
+ if self
2113
+ . last_modified_commit ( & [ "src/llvm-project" ] , "download-ci-llvm" , true )
2114
+ . is_none ( )
2115
+ {
2116
+ // there are some untracked changes in the the given paths.
2117
+ false
2118
+ } else {
2119
+ llvm:: is_ci_llvm_available ( & self , asserts)
2120
+ }
2117
2121
} else {
2118
2122
llvm:: is_ci_llvm_available ( & self , asserts)
2119
2123
}
You can’t perform that action at this time.
0 commit comments