Commit 01f4347 1 parent 092e2d7 commit 01f4347 Copy full SHA for 01f4347
File tree 2 files changed +58
-32
lines changed
2 files changed +58
-32
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) Joby Aviation 2022
2
+ # Original authors: Thulio Ferraz Assis (thulio@aspect.dev), Aspect.dev
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ """This module provides patches for LAPACK archive.
17
+ """
18
+
19
+ # make.inc is required to be present when calling `make` to build LAPACK.
20
+ # We override these values with arguments and environment variables passed to
21
+ # the build action, so this file remains static for determinism during build.
22
+ _create_make_inc = """\
23
+ cat > make.inc <<EOF
24
+ ####################################################################
25
+ # LAPACK make include file. #
26
+ ####################################################################
27
+
28
+ SHELL = $0
29
+
30
+ CC ?=
31
+
32
+ FC ?=
33
+ FFLAGS ?=
34
+ FFLAGS_DRV ?=
35
+ FFLAGS_NOOPT ?=
36
+
37
+ LDFLAGS ?=
38
+
39
+ AR ?=
40
+ ARFLAGS = cr
41
+ RANLIB = echo
42
+
43
+ BLASLIB ?=
44
+ CBLASLIB ?=
45
+ LAPACKLIB ?=
46
+ TMGLIB ?=
47
+ LAPACKELIB ?=
48
+
49
+ DOCSDIR ?=
50
+
51
+ TIMER ?=
52
+ EOF
53
+ """
54
+
55
+ LAPACK_PATCHES = [_create_make_inc ]
Original file line number Diff line number Diff line change 18
18
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
19
19
load ("@bazel_tools//tools/build_defs/repo:utils.bzl" , "maybe" )
20
20
21
+ load ("//examples/lapack:patches.bzl" , "LAPACK_PATCHES" )
22
+
21
23
# buildifier: disable=function-docstring
22
24
def internal_dependencies ():
23
25
maybe (
@@ -59,38 +61,7 @@ def internal_dependencies():
59
61
http_archive ,
60
62
name = "lapack" ,
61
63
build_file_content = _ALL_SRCS ,
62
- patch_cmds = ["""\
63
- cat > make.inc <<EOF
64
- ####################################################################
65
- # LAPACK make include file. #
66
- ####################################################################
67
-
68
- SHELL = $0
69
-
70
- CC ?=
71
-
72
- FC ?=
73
- FFLAGS ?=
74
- FFLAGS_DRV ?=
75
- FFLAGS_NOOPT ?=
76
-
77
- LDFLAGS ?=
78
-
79
- AR ?=
80
- ARFLAGS = cr
81
- RANLIB = echo
82
-
83
- BLASLIB ?=
84
- CBLASLIB ?=
85
- LAPACKLIB ?=
86
- TMGLIB ?=
87
- LAPACKELIB ?=
88
-
89
- DOCSDIR ?=
90
-
91
- TIMER ?=
92
- EOF
93
- """ ],
64
+ patch_cmds = LAPACK_PATCHES ,
94
65
sha256 = "cd005cd021f144d7d5f7f33c943942db9f03a28d110d6a3b80d718a295f7f714" ,
95
66
strip_prefix = "lapack-3.10.1" ,
96
67
url = "https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.10.1.tar.gz" ,
You can’t perform that action at this time.
0 commit comments