According to this etymological dictionary of the cognate Spanish abrigar, the meaning of "to protect against the wind" was already attested in 4th century AD Latin.
ABRIGAR, del lat. APRĪCARE 'calentar con el calor del sol', I.a doc.: Berceo.
La ac. 'proteger contra el viento' ya se halla en en el latín de Paladio (S. IV d. C.: Cabrera). Cuervo, Dicc. I, 62-64; Cej. IV, § 73.
DERIV. Abrigo [Fn. Gonz.] (postverbal de abrigar); el adj. ant. abrigo 'abrigado', en Berceo y en Martín Pérez de Ayala (1566: Mod. Philol. XXIV, 358) es el lat. APRĪCUS 'soleado', posteriormente sustituído por 'abrigaño' [Nebr. Abrigaños «lugares guardados del viento», en el vocabulario de med. S. XV. RFE XXXV, 336]. Abrigadal 'abrigadero' ast. (V). Desabrigar [1455 (BHisp. LVIII, 85); Nebr.].
Wiktionary suggests this is via extending the meaning "sunny" to "that which wards off the cold".
Notably, in French (and most other Romance languages) there is a doublet of verbs with contrasting definitions, depending on whether the term came via aprīcāre or not:
Latin
aperīre ("to uncover, open")
Spanish
abrir ("to open")
Vulgar Latin
*operīre
Old French
ovrir ("to open")
French
ouvrir ("to open")
Latin
aprīcus
Latin
aprīcārī ("warm in the sun")
Late Latin
aprīcāre
French
abrier ("to cover")
Spanish
abrigar ("to cover")
Latin
operīre ("to cover, shut")
Latin
cooperīre ("to cover completely")
Spanish
cubrir ("to cover")
Old French
covrir
French
couvrir ("to cover")
It is interesting that operīre ("to cover") seems to have influenced the form of the aperīre ("to open") descended verbs of many Gallo-Romance languages (see column 3 below); while the cognate abrigar/abrier (retaining a similar form to aperīre) has flipped in meaning to "to cover" (column 4):
+----------------+------------------+---------------+--------------+--------------------+
| | "To open" | "To open" | "To cover" | "To cover" |
| Language | (via aperīre) | (via aperīre, |(via aperīre, | (via aperīre, |
| | | *operīre) | aprīcāre)| *operīre, |
| | | | | cooperīre) |
+----------------+------------------+---------------+--------------+--------------------+
| Fala | abril | - | ? | ? |
+----------------+------------------+---------------+--------------+--------------------+
| Old Portuguese | abrir | - | abrigar | cobrir |
+----------------+------------------+---------------+--------------+--------------------+
| Portuguese | abrir | - | abrigar | cobrir, acobertar |
+----------------+------------------+---------------+--------------+--------------------+
| Galician | abrir | - | abrigar | cubrir |
+----------------+------------------+---------------+--------------+--------------------+
| Asturian | abrir | - | abrigar | cubrir |
+----------------+------------------+---------------+--------------+--------------------+
| Spanish | abrir | - | abrigar | cubrir |
+----------------+------------------+---------------+--------------+--------------------+
| Aragonese | - | ubrir | abrigar | cubrir |
+----------------+------------------+---------------+--------------+--------------------+
| Old Provençal | - | obrir | ? | cobrir |
+----------------+------------------+---------------+--------------+--------------------+
| Catalan | - | obrir | abrigar | cobrir |
+----------------+------------------+---------------+--------------+--------------------+
| Occitan | - | obrir, dobrir | abrigar | cobrir, cubrir |
+----------------+------------------+---------------+--------------+--------------------+
| Old French | - | ovrir, olvrir,| abrier | covrir, cuvrir |
| | | ouvrir, uvrir | | |
+----------------+------------------+---------------+--------------+--------------------+
| French | - | ouvrir | abrier | couvrir |
+----------------+------------------+---------------+--------------+--------------------+
| Norman | - | ouvri (Jersey)| ? | ? |
+----------------+------------------+---------------+--------------+--------------------+
|Franco-Provençal| - | uvrir | ? | ? |
+----------------+------------------+---------------+--------------+--------------------+
| Italian | aprire | - | ? | coprire |
+----------------+------------------+---------------+--------------+--------------------+
| Neapolitan | arapì, arape | - | ? | ? |
+----------------+------------------+---------------+--------------+--------------------+
| Venetian | averzir, avèrzer,| - | ? | covrir, covèrzar, |
| | avèrxer, vèrzer, | | | coèrxar, coèrxer, |
| | vèrzar, verxar | | | covèrxer, cuèrxer, |
| | | | | cuèrzar |
+----------------+------------------+---------------+--------------+--------------------+
| Sicilian | apriri, iàpriri, | - | ? | ? |
| | jàpriri, gràpiri | | | |
+----------------+------------------+---------------+--------------+--------------------+
| Sardinian | abbèrrere, | - | ? | cobèrrere, cobèrri,|
| |abèrriri, apèrrere| | |cobèrriri, copèrrere|
+----------------+------------------+---------------+--------------+--------------------+
| Friulian | avierzi, aviergi,| - | ? | cuvierzi, cuviergi |
| | vierzi, viergi | | | |
+----------------+------------------+---------------+--------------+--------------------+
| Romansch | avrir, arver | - | ? | cuvrir, cuvierer, |
| | | | | cuvreir |
+----------------+------------------+---------------+--------------+--------------------+
| Dalmatian | apiar, aprer | - | ? | coprer |
+----------------+------------------+---------------+--------------+--------------------+
| Aromanian | apir, apiriri | - | ? | acoapir, acupiriri |
+----------------+------------------+---------------+--------------+--------------------+
| Romanian | ? | - | ? | acoperi |
+----------------+------------------+---------------+--------------+--------------------+
| Walloon | drovi | - | ? | ? |
+----------------+------------------+---------------+--------------+--------------------+